开发者

Jquery - Using $(this) with multiple selectors? [duplicate]

开发者 https://www.devze.com 2023-04-12 23:45 出处:网络
This question already has an answer here: Closed 11 years ago. Possible Duplicate: Jquery multiple selectors with this
This question already has an answer here: Closed 11 years ago.

Possible Duplicate:

Jquery multiple selectors with this

Is it possible to use multiple selectors with $(this)? I tried:

$('#helper')开发者_如何学Go.click(function() {
$(this + " #divname").html());
});

But it never works. I just want to make sure its selecting the div within the div that was clicked on.


if you are trying to look for a child of this you can do it like

$('#helper').click(function() {
$(" #divname",this ).html());
});
0

精彩评论

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