Who is my parent listener?

$(".cblClaimSources").on('click', ':checkbox', function (){
    alert('im : '+ $(this).attr('id') + ' and my Parent listener is '+ ?????);
});

Is it possible for insider $(this)anyone to know who is his listening parent? [ $(".cblClaimSources")]?

+3
source share
2 answers

If using jQuery 1.7:

$(".cblClaimSources").on('click', ':checkbox', function (e) {
  var parentListener = e.delegateTarget;
});

http://jsfiddle.net/mHXMq/3/

+6
source
+3
source

All Articles