if I have :
$('.someClass', $('#context1,#context1')).bind('click',
function(e){
/开发者_如何学编程/ XXX
}
);
how can I know in point XXX , which context (context1 or context2) is the one that the .someClass element was clicked ?
Thanks, greetings
This should work
$(this).parents().filter("#context1,#context2")
Edit: My previous example had find
instead of filter
, I've fixed it
精彩评论