簡體   English   中英

JQuery mobile更改了html代碼

[英]JQuery mobile changes html code

我想使用jqm來檢測滑動,但如果我將其添加到我的代碼中,我會看到HTML代碼已更改!!

例如,輸入無線電元素被包裝

<div class =“ui-radio”> </ div>

我可以抑制這種行為嗎?

我找到了解決方案:

在加載jQuery移動庫之前添加這段腳本:

<script type =“text / javascript”> $(document).bind(“mobileinit”,function(){$ .extend($ .mobile,{autoInitializePage:false})}); </ script>

這可以防止jquery mobile初始化頁面並觸摸DOM,從而使您的布局單獨處理(感謝eivers88)

向元素添加data-role="none"應該會阻止jQuery Mobile添加其他類。

資料來源: jQuery Mobile Demo

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM