Skip to content

Instantly share code, notes, and snippets.

@corydorning
Created March 5, 2013 16:17
Show Gist options
  • Save corydorning/5091479 to your computer and use it in GitHub Desktop.
Save corydorning/5091479 to your computer and use it in GitHub Desktop.
Access the delegated selector in jQuery
$(function(){
$('.foo').on('click', 'a', function(ev) {
// logs .foo as a jQuery object
console.log($(ev.delegateTarget));
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment