How to add property to existing class

后端 未结 6 1584

I have got a CSS class like so:

.simpleClass {
    width: 25px;
}

And I have a matching element:

6条回答
  •  一整个雨季
    2021-02-19 12:05

    you can specify the style of the element by using .css like

    $("div.simpleClass").css("width","25px");
    

    have a look at jQuery.css()

提交回复
热议问题