Is there a ways in jQuery to tell which child was clicked if the onclick event was binded to the parent?
For instance:
$(\'#daddy\').click(function ()
use event.target to get the really clicked node:
event.target
$('#daddy span').on('click',function(event){ if(event.target.nodeName=='BUTTON'){//Was clicked a button .... } if(event.target.id=='id'){//Was clicked #id .... } ... });