jquerymobile listview定位标记不工作
我有一个列表视图(jquerymobile),其中有5个jquerymobile listview定位标记不工作,jquery,html,jquery-mobile,Jquery,Html,Jquery Mobile,我有一个列表视图(jquerymobile),其中有5个项,如下所示- <div class="ticketsBlock" data-theme="a"> <ul data-role="listview" data-inset="true"> <li><a href="#custDetails" style="text-decoration:none" data-transition="slide"><p
项,如下所示-
<div class="ticketsBlock" data-theme="a">
<ul data-role="listview" data-inset="true">
<li><a href="#custDetails" style="text-decoration:none" data-transition="slide"><p>John Smith</p><p>2 Cadeau Terr London ON N6K 4G1</p><br/><p>Issue with set-top box</p></a></li>
<li><a href="#custDetails" style="text-decoration:none"><p>Sylvester Stallone</p><p>64 Faywood Dr Brampton ON L6Y 4L95</p><br/><p>New Connection</p></a></li>
<li><a href="#custDetails" style="text-decoration:none"><p>Antenna Replacement</p><p>14 Grand St Brantford ON N3R 4B1</p><br/><p>New Connection</p></a></li>
<li><a href="#custDetails" style="text-decoration:none"><p>Keanu Reaves</p><p>5617 Fourth Line Hillsburgh ON N0B 1Z0</p><br/><p>Distorted Display</p></a></li>
<li><a href="#custDetails" style="text-decoration:none"><p>Tom Cruise</p><p>RR5 Perth ON K7H 3C7</p><br/><p>Issue with set-top box</p></a></li>
</ul>
</div>
每个
中的href引用同一HTML页面中的div标记,其数据角色为“page”-
返回
XXX
出口
内容
我的页脚
根据JQM的标准,此html页面具有不同的div-s,其数据角色为“页面”。现在,当我单击引用div(数据角色为页面)的列表项时,它并没有导航到该div
但是是的,如果我在同一个HTML页面中提供指向不同HTML页面的链接,而不是div,那么它是有效的
任何人,请告诉我这种方法哪里有问题?这种方法行得通吗?在这里效果很好
它转到该分区。请检查下面的html标记
<div data-role="page">
<div id="my-header" data-role="header" data-position="fixed">
<h1>Page Title</h1>
</div><!-- /header -->
<div data-role="content">
<div class="ticketsBlock" data-theme="a">
<ul data-role="listview" data-inset="true">
<li><a href="#custDetails" style="text-decoration:none" data-transition="slide"><p>John Smith</p><p>2 Cadeau Terr London ON N6K 4G1</p><br/><p>Issue with set-top box</p></a></li>
<li><a href="#custDetails" style="text-decoration:none"><p>Sylvester Stallone</p><p>64 Faywood Dr Brampton ON L6Y 4L95</p><br/><p>New Connection</p></a></li>
<li><a href="#custDetails" style="text-decoration:none"><p>Antenna Replacement</p><p>14 Grand St Brantford ON N3R 4B1</p><br/><p>New Connection</p></a></li>
<li><a href="#custDetails" style="text-decoration:none"><p>Keanu Reaves</p><p>5617 Fourth Line Hillsburgh ON N0B 1Z0</p><br/><p>Distorted Display</p></a></li>
<li><a href="#custDetails" style="text-decoration:none"><p>Tom Cruise</p><p>RR5 Perth ON K7H 3C7</p><br/><p>Issue with set-top box</p></a></li>
</ul>
</div>
</div><!-- /content -->
<div data-role="footer" data-position="fixed">
<h4>Page Footer</h4>
</div><!-- /footer -->
</div><!-- page -->
页面标题
页脚
您可以添加完整的HTML页面吗。没有它,我们只能猜测。您的listview位于不同的数据角色=页面中?您确定所有标签都已正确关闭吗?如果一个
丢失,将破坏整个设置。嗨@yeyene。。。我完全不确定我的机器出了什么问题?同样的东西在我的机器上不起作用。这与我正在使用的JQM版本有关吗?@yeyene。。我找到了。。这是a的问题-我错过了一个:(
<div data-role="page">
<div id="my-header" data-role="header" data-position="fixed">
<h1>Page Title</h1>
</div><!-- /header -->
<div data-role="content">
<div class="ticketsBlock" data-theme="a">
<ul data-role="listview" data-inset="true">
<li><a href="#custDetails" style="text-decoration:none" data-transition="slide"><p>John Smith</p><p>2 Cadeau Terr London ON N6K 4G1</p><br/><p>Issue with set-top box</p></a></li>
<li><a href="#custDetails" style="text-decoration:none"><p>Sylvester Stallone</p><p>64 Faywood Dr Brampton ON L6Y 4L95</p><br/><p>New Connection</p></a></li>
<li><a href="#custDetails" style="text-decoration:none"><p>Antenna Replacement</p><p>14 Grand St Brantford ON N3R 4B1</p><br/><p>New Connection</p></a></li>
<li><a href="#custDetails" style="text-decoration:none"><p>Keanu Reaves</p><p>5617 Fourth Line Hillsburgh ON N0B 1Z0</p><br/><p>Distorted Display</p></a></li>
<li><a href="#custDetails" style="text-decoration:none"><p>Tom Cruise</p><p>RR5 Perth ON K7H 3C7</p><br/><p>Issue with set-top box</p></a></li>
</ul>
</div>
</div><!-- /content -->
<div data-role="footer" data-position="fixed">
<h4>Page Footer</h4>
</div><!-- /footer -->
</div><!-- page -->