Is there a style selector in jQuery?

前端 未结 5 1246
没有蜡笔的小新
没有蜡笔的小新 2020-11-30 10:27

If I want to select every image which it\'s alt is Home for example, I can do something like this:

$(\"img[alt=\'Home\']\")

But how can I s

5条回答
  •  孤城傲影
    2020-11-30 10:55

    I have no idea if this will work, but...:

    ${"[style*=width: 750px]")
    

    However, you might be better off using a class to control the width, then modifying the width of all instances of that class... or changing to a different class:

    $(".classname").removeClass("classname").addClass("otherclassname");
    

提交回复
热议问题