Hap*_*ppy 48 css jquery-mobile
是否有可能指示jQuery Mobile不设置我的输入框和提交按钮的样式.我很喜欢我的自定义CSS.jQuery移动脚本将自己的样式应用于我的所有元素.
我试过的一个解决方法是覆盖我的自定义CSS中的那些元素.我可以做任何其他功能吗?这样的事情
$.ignoreStyles("button,text");
Run Code Online (Sandbox Code Playgroud)
Fré*_*idi 101
jQuery Mobile将忽略其data-role
属性设置为的元素none
.因此,您只需将这些属性添加到标记中:
<input type="text" name="foo" data-role="none" />
<button type="button" id="bar" data-role="none">Button</button>
Run Code Online (Sandbox Code Playgroud)
这适合我.
$(document).bind("mobileinit", function() {
$.mobile.ignoreContentEnabled = true;
});
<div data-enhance="false">
<input type="checkbox" name="chkbox1" id="chkbox1"
checked />
<label for="chkbox1">Checkbox</label>
<input type="radio" name="radiobtn1" id="radiobtn1"
checked />
<label for="radiobtn1">Radio Button</label>
</div>
Run Code Online (Sandbox Code Playgroud)