Happy Happy - 1 year ago 94
CSS Question

How can i stop jQuery mobile to apply styles to my specific form elements

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.

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


Answer Source

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>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download