开发者

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 n开发者_开发问答eed to have one of these element not themed. How to do that?


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


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');


As of 1.3, it looks adding the attribute

data-theme="none"

does the trick.


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 ;)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜