Skip to content

24 ways to impress your friends

Vote up?

Dodfr

Very usefull tips !

An other “pro” when you use the .on(‘click’,‘selector’,function({}) is that if you dynamically add a some element in ‘selector’ scope, then it will automatically be caught by the click event and you will not have to stick it to the event :-)

Very usefull when you add new <li> items for example.