所以我想做一個滾動列表:jQuery Mobile的滾動型
<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>
封閉在:< .section僞類= 「ex_list」 風格=「浮動:權利;寬度:70%;溢出:隱藏「>標籤
我使用以下腳本:
http://jquerymobile.com/test/experiments/scrollview/jquery.mobile.scrollview.js
http://jquerymobile.com/test/experiments/scrollview/scrollview.js
除了jqm和jq。問題是,在電腦上滾動不起作用(但它並沒有那麼糟糕),但在iPad上整個網站正在滾動除了列表視圖。用戶也可以滾動瀏覽網站,看到灰色的BG,直到Safari瀏覽器停止滾動。
編輯:另外,這些2周JS的使 'toggleClass()' jQuery函數無法正常工作。
和你期待的結果是什麼? – JamesHalsall
除了工作'toggleClass()'函數,以及我希望只有listview是可滾動的。或者如果整個頁面應該是可滾動的,至少它不應該在頁面上方滾動,顯示灰色背景......您可能已經注意到它是ASP控件的一部分,Master Page沒有像數據滾動一樣,但它滾動:'( – Rufix