I have few nested DIV elements. For example:
<div id='id1'><div id='id2'>content</div></div>
I attach event to DIVs event handler using jQuery:
$('div').click(function () {
//some code
});
There will be two events when user click on content. So there will be two simultaneous events. Is it possible to get inside event handler array of objects (DIVs) what have click event?
May be it is possible using other framework but jQuery?
If you literally want an array of the
divobjects that would get the click event, you could do:Not sure if that’s what you want, but
arraywill contain an array ofdivs up the chain.