我如何停止 jQuery Mobile 将样式应用到我的特定表单元素 [英] How can i stop jQuery mobile to apply styles to my specific form elements
问题描述
是否可以指示 jQuery Mobile 不对我的输入框和提交按钮设置样式.我很擅长我的自定义 CSS.jQuery 移动脚本将自己的样式应用于我的所有元素.
Is it possible to instruct jQuery Mobile to not style my Input box and submit button. I am good with my custom CSS. jQuery mobile script is applying its own style to all my elements.
我尝试的一种解决方法是在我的自定义 css 中覆盖这些元素.是否还有其他可用的功能可以执行此操作?像这样的事情
the one workaround i tried is overriding those elements in my custom css. Is there any other functions available where i can do this ? some thing like this
$.ignoreStyles("button,text");
推荐答案
jQuery Mobile 将忽略 data-role
属性设置为 none
的元素.因此,您可以简单地将这些属性添加到您的标记中:
jQuery Mobile will ignore elements whose data-role
attributes are set to none
. Therefore, you can simply add these attributes to your markup:
<input type="text" name="foo" data-role="none" />
<button type="button" id="bar" data-role="none">Button</button>
这篇关于我如何停止 jQuery Mobile 将样式应用到我的特定表单元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!