开发者

How to override specific jquery classes?

For example in my code I want to override .ui-widget-header(for a image) and .ui-dialog(to set a max-width).

But this affects my grids. So I need to set the ui stuff programmatically

.ui-dialog
{
width: 650px !important;
}

#tabs .ui-widget-header 
{
background-image: url('images/menu_bg_right.png');
background-repeat: no-repeat;
/*-- begin IE 7 --7% to left, 30% to 100%;55px to 50px*/
background-position: left 100%;
height: 5开发者_运维问答0px;
/*-- end IE 7 --*/
background-color: Transparent;
border: none;
width: 610px;
float: left;
}

Picture of the grid(Actual):

How to override specific jquery classes?

Picture of the grid(Expected):

How to override specific jquery classes?

Thanks


$("#sometable th").removeClass(".ui-widget-header");

This would kill all UI styles on the selected element.

$("#sometable .ui-widget-header").css("background-image", "none");

This would remove the background image style.

But you might just want to write better CSS selectors that are more specific, or even use the !important modifier:

body #header #my_table th.ui-widget-header {
  background-image: none !important;
}

And then repeat for other styles you want to remove - widths, heights, etc. Not clear on what you actually want to change.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜