I have elements dynamically added to the div ‘wrap’, such as:
<div id='wrap'>
<div id="one">apple</div>
<div id="two">pear</div>
</div>
The child divs have click events that go to an ajax call.
$('#wrap').delegate('div', 'click', getInfo);
I want to undelegate the click event from the specific div that was clicked. In other words, if div#one is clicked, the event is undelegated from div#one but remains delegated on div#two.
Thanks
You could add a class to clicked
divs that would end up filtering them out in the future:Here’s an example: http://jsfiddle.net/7EpSK/