简体   繁体   English

jquery ui 微调器更改一个特定微调器的样式

[英]jquery ui spinner change style of one specific spinner

I want to remove the ui-corner-tr and ui-corner-br classes from one specific spinner with an id of test and a class of testSpinner as an example.我想从一个特定的微调器中删除ui-corner-trui-corner-br类,该微调器具有test的 id 和 testSpinner 的testSpinner作为示例。

I tried... and many combinations of classes with no luck.我尝试了......以及许多没有运气的课程组合。

$('.ui-spinner .testSpinner').removeClass('.ui-corner-tr');
$('#test').removeClass('.ui-corner-tr');

Any ideas?有任何想法吗?

It can be an order issue: maybe the jqueryUI library loads after your code, nullifying it.这可能是一个订单问题:也许 jqueryUI 库在您的代码之后加载,使其无效。

(I'm just guessing... You should provide more details). (我只是在猜测......你应该提供更多细节)。

the removeClass method does not require CSS selector names, just class names. removeClass方法不需要 CSS 选择器名称,只需要 class 名称。

$('.ui-spinner .testSpinner').removeClass('ui-corner-tr');
$('#test').removeClass('ui-corner-tr');

Reference: https://api.jquery.com/removeclass/参考: https://api.jquery.com/removeclass/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM