我有一個簡單的jQuery移動頁面,有一個側邊欄面板,一旦單擊head元素中的按鈕,就會在左側打開。這工作正常。問題是我在側邊欄面板中有一個包含範圍滑塊的窗體,並且當您將rangeslider移動到左側時,面板關閉。任何想法如何防止這一點。jQuery移動面板不應該關閉滑動左
我曾嘗試:data-swipe-close="false"
(發現here)
,只是要還安全:data-dismissible="false"
從上面相同的鏈接。
我的HTML如下。側邊欄面板的內容在頁面加載時生成並正確顯示,並且表單提交正確:
<div data-role="page" data-type="page" id="select">
<div data-role="panel" data-theme="g" id="sidebar" data-display="overlay" data-position-fixed="true" data-swipe-close="false" data-dismissible="false">
<div id='sidebarview' data-theme='g' data-role="collapsible-set" data-inset="false" data-mini="false"></div>
</div>
<div id="header" data-theme="h" data-role="header" data-position="fixed">
<h3>MOBILE</h3>
<a id='sidebarbutton' data-role="button" data-theme="h" href="#sidebar" class="ui-btn-left" data-icon="bars" data-iconpos="notext"></a>
<a id='gpsButton' data-role="button" data-theme="h" href="javascript:void(0);" class="ui-btn-right">GPS</a>
</div>
<div id="content-dataview" data-role="content">
</div>
<div data-role="footer" data-id="footer" data-position="fixed" data-theme="h">
<div data-role="navbar" data-theme="h">
<ul>
<li><a onclick='user.logout();' href='javascript:void(0)'>Logout</a></li>
</ul>
</div>
</div>
</div>
任何想法?
您還應該添加一個rangeslider到面板上。不要指望其他人會這樣做。 – Gajotres
在頁面加載時,會將rangeslider動態添加到面板。我確實說過這一切都很完美。 –
@MarcStevenPlotz - 也許他們實際上想看到一些代碼,但沒有認識到jQuery mobile如何從標記中運行。 –