所以我想创建一个可滚动的列表:
<div data-role="content-primary" class="list" style="height:100%; overflow:scroll" data-scroll="y">
<ul data-role="listview" id="mainList" >
<asp:Repeater ID="expList" runat="server" OnItemDataBound="expList_ItemDataBound" ClientIDMode="Static">
<ItemTemplate>
<li class="opener" runat="server" id="lItem" style="border-top: 1px solid rgb(200,200,200)">
<div id="divPic" runat="server" class="pic">
<h2><asp:Literal runat="server" ID="litName"></asp:Literal></h2>
<p><asp:Literal runat="server" ID="litDesc"></asp:Literal></p>
<input type="hidden" Id="brand" runat="server"/>
<input type="hidden" Id="cat" runat="server"/>
</div>
</li>
</ItemTemplate>
</asp:Repeater>
</ul>
</div>
Run Code Online (Sandbox Code Playgroud)
括在:<.section class ="ex_list"style ="float:right; width:70%; overflow:hidden">标签
我使用以下脚本:
http://jquerymobile.com/test/experiments/scrollview/jquery.mobile.scrollview.js
http://jquerymobile.com/test/experiments/scrollview/scrollview.js
除了jqm和jq.问题是在PC上滚动不起作用(但它并没有那么糟糕),但在iPad上整个网站除了列表视图之外还在滚动.用户还可以在站点上滚动并查看灰色bg,直到safari停止滚动.
编辑:另外这两个JS使'toggleClass()'jQuery函数不起作用.
$(document).keypress(function (e) {
if (e.which == 13) {
filtruj();
return false;
}
return false;
});
Run Code Online (Sandbox Code Playgroud)
我想filtruj()在用户按下Enter键时调用并阻止页面提交.
通常,单击<a href="#" id="filterButton" onclick="filtruj();" class="t-button t-grid-add">Filtruj</a>元素调用此函数.
相反的是,我无法在表单字段中的任何位置键入内容.