Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jquery disable theming for a specific element

Is there a way to disable the theming on one element in the page?

I have some Jquery UI element but I need to have one of these element not themed. How to do that?

like image 744
Patrick Desjardins Avatar asked Jan 24 '10 19:01

Patrick Desjardins


4 Answers

I know this question is old but it looks like jQuery Mobile now has a way to get around this:

data-role="none"

Add that to any form or button element to remove jQuery Mobile Theming.

http://jquerymobile.com/demos/1.0/docs/forms/forms-all-native.html

like image 136
Dan P. Avatar answered Oct 12 '22 13:10

Dan P.


JQuery UI is made up of some standard CSS framework classes. You can remove the UI themes from an element by turning off those classes. Check out the JQuery UI docs to see a list of the classes and decide which one it is you want to remove (using Firebug makes this pretty easy as well, you can identify which UI classes are applied). ui-widget and ui-state-default are likely choices.

Once you know the class, just use JQuery's removeClass() to get it off:

$('element').removeClass('ui-widget');
like image 40
zombat Avatar answered Oct 12 '22 12:10

zombat


As of 1.3, it looks adding the attribute

data-theme="none"

does the trick.

like image 29
Geoff Avatar answered Oct 12 '22 11:10

Geoff


There is a way ;) You have to remove all declaration of addClass in jQuery JavaScript file.

Find a proper section (for me was acccordion) and delete from js code addClass().

It work for me ;)

like image 23
wiewior Avatar answered Oct 12 '22 13:10

wiewior