Jquery 如何删除div的所有子元素上的JQM样式
所以我有一个使用JQM和twitter引导的移动应用程序,基本上我使用JQM进行导航栏、导航等,但我不希望将内容样式设置在名为.content的特定元素之下Jquery 如何删除div的所有子元素上的JQM样式,jquery,jquery-mobile,jquery-selectors,Jquery,Jquery Mobile,Jquery Selectors,所以我有一个使用JQM和twitter引导的移动应用程序,基本上我使用JQM进行导航栏、导航等,但我不希望将内容样式设置在名为.content的特定元素之下 <div data-role="page" id="home"> <div class="content clearfix"> //bunch of dom stuff here </div> </div> 您可以在容器元素上设置data enhance=“f
<div data-role="page" id="home">
<div class="content clearfix">
//bunch of dom stuff here
</div>
</div>
您可以在
容器
元素上设置data enhance=“false”
。
您还需要启用全局配置
标志-忽略已启用的内容
请注意,设置ignoreContentEnabled
会导致页面增强过程中的性能下降
阅读本手册的增强功能部分
$(document).on('pagebeforecreate', "[data-role=page]", function() {
$('.content *',$(this)).each(function(index, value) {
$(this).attr('data-role','none');
});
});