开发者

jQuery select an element by multiple css classes

开发者 https://www.devze.com 2023-01-01 14:27 出处:网络
jQuery Class selector works well if you have a single class assigned to an element. What if I assign two classes to an element(Ex:<div class=\"one two\">), how can I find that element if I k开发

jQuery Class selector works well if you have a single class assigned to an element. What if I assign two classes to an element(Ex: <div class="one two">), how can I find that element if I k开发者_运维问答now these two classes?


$("div.one.two")


$('.one.two');

more on multiple selectors if you just did a search on SO first.

0

精彩评论

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