Event delegation confirmation

Event delegation confirmation

i used to know that this is better

$('ul.parent').click(function(e){
      if(e.target.nodeName === 'A'){
      //the event will bubble [speed optimization]
      //instead of using $('a').click(function(){$(this).whatever})
}
});

in try.jquery.com they say

$('ul.parent').on('click','a',function(){...}) // is this the same