Speed Up JavaScript Object Detection

Dean Edwards has a great JavaScript tip that will show you how to Speed Up Object Detection.  New theory must be an outstanding tip if it’s the very first on a supposedly recurring series! This is valuable because of all the irregularities that one finds even today in browsers (and not only Internet Explorer), which force us to create different branches for different browsers. The particular tip that Edwards is showing us today with the help of code snippets within the article allows us to perform object detection only one time when we call addEvent for instance, rather than every time we call it.

JavaScript Lightbox

Lightbox JS is a nifty unobtrusive script used to to overlay images on the current page. It’s a simple to setup and works on all modern browsers. So simple in fact, all you need to do is add a rel="lightbox" attribute to the anchor tag that surrounds the img element and the effect is added on page load!  I am starting to see the script in action around the Internet and it is a very elegant addition to your graphic user interface that will enhance the presentation of images, regardless of the kind of site to which you add it. And anyway I like featuring JavaScript scripts like this on this site because we all most likely have a folder full of them for reference.