开发者

Find elements with given class and multiple attribute Jquery

开发者 https://www.devze.com 2023-04-06 22:00 出处:网络
How do we do a each() with multiple attributes? Working: $(\".divReplies[userId=\"+userIdTemp+\"] \").each(function(index, element) {

How do we do a each() with multiple attributes?

Working:
$(".divReplies[userId="+userIdTemp+"] ").each(function(index, element) {

});

Not wo开发者_开发问答rking:

$(".divReplies[userId="+userIdTemp+" replyId="+replyId+"]").each(function(index, element) {

}); 

Thanks


You have use separate brackets for each attribute:

$(".divReplies[userId="+userIdTemp+"][replyId="+replyId+"]").each
0

精彩评论

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