如何防止 jQuery mobile 的自动页面样式? [英] How to prevent jQuery mobile's automatic page styling?

查看:24
本文介绍了如何防止 jQuery mobile 的自动页面样式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

jQuery mobile 会在加载时自动将类添加到我页面上的所有元素...这真的把我在页面上的 jQuery UI 小部件搞得一团糟.有什么办法可以阻止 jQuery mobile 自动向我的 HTML 元素添加类?我的页面上只需要一些 jQuery 移动小部件,我想明确指定它们.

jQuery mobile automatically adds classes to all elements on my page on loading... this really messes up the jQuery UI widgets I have on the page. Is there any way to prevent jQuery mobile from automatically adding classes to my HTML elements? I only wan't some of the jQuery mobile widgets on my page, and I want to specify them explicitly.

推荐答案

您可以通过在下面放置属性来要求 jquery mobile 不要触摸您的小部件:

You can ask jquery mobile not to touch your widget by putting the attribute below:

data-role="none"

这篇关于如何防止 jQuery mobile 的自动页面样式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆