jQuery禁用特定元素的主题 [英] Jquery disable theming for a specific element

查看:90
本文介绍了jQuery禁用特定元素的主题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法可以禁用页面中某个元素的主题设置?

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

我有一些Jquery UI元素,但我需要其中一个主题不是主题.该怎么做?

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

推荐答案

JQuery UI由一些标准CSS框架类组成.您可以通过关闭这些类来从元素中删除UI主题.查看 JQuery UI文档,以查看这些类的列表并确定它是哪一个想要删除(使用Firebug也很容易,您可以确定应用了哪些UI类). ui-widgetui-state-default是可能的选择.

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.

一旦您知道了该类,就可以使用JQuery的removeClass()将其删除:

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

$('element').removeClass('ui-widget');

这篇关于jQuery禁用特定元素的主题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆