我从事 jQuery Mobile 的项目。
在页面中,我想mobilescroll用于选择(http://demo.mobiscroll.com/select#language=fr&display=inline)
我尝试data-role="none",但它不适用于孩子并mobilescroll创建自己的标签。
如何在 a 的全部内容中禁用 jQuery Mobile 的样式div?
谢谢
我从事 jQuery Mobile 的项目。
在页面中,我想mobilescroll用于选择(http://demo.mobiscroll.com/select#language=fr&display=inline)
我尝试data-role="none",但它不适用于孩子并mobilescroll创建自己的标签。
如何在 a 的全部内容中禁用 jQuery Mobile 的样式div?
谢谢
It's possible to prevent jQuery Mobile from enhancing elements. however, following this solution will make your application slower than usual.
First, you need to globally set ignoreContentEnabled to true.
<head>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script>
$(document).on("mobileinit", function(){
$.mobile.ignoreContentEnabled = true;
});
</script>
<script src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></script>
</head>
And then, add data-enhance="false" attribute to elements which you don't want JQM to enhance. This is the reason why app becomes slow, because JQM checks for this attribute in all elements.