7 JavaScript Things I Wish I Knew Much Earlier In My Career — Smashing Magazine

This could also be done with a single event handler:(function(){ var resources = document.getElementById(‘resources’); resources.addEventListener(‘click’,handler,false); function handler(e){ var x = e.target; // get the link tha if(x.nodeName.toLowerCase() === ‘a’){ alert(‘Event delegation:’ + x); e.preventDefault(); } };})();CopyBecause the click happens on all the elements in the list, all you need to do is compare the nodeName…

Ordinary Fonts (Updated)

These are all free fonts, mostly from Google Fonts (hardly the only foundry, but free and highly functional, and easy to use). I’ve also thrown in a few “web safe fonts” – fonts everyone has and a lot of people still use – so don’t be embarrassed if you find yourself liking the most generic font there is, the one you just got through saying you never wanted to see again.