I haven't implemented new feature in Lightbox script in ages, but I've mucked around with my Lightbox script aka "Lightbox plus" in this month. You can see the details and samples in Lightbox plus page

Lightbox is very cool and useful script to display an image on the page. Lightbox is quite attractive, so nowadays we have a lot of alternatives (see examples). Lightbox plus is one of alternatives as well.

The original "Lightbox" has been updated as Lightbox JS v2 which supports several new feature such as image set and cool animation transition. I've already implemented image set feature in lightbox plus, however I haven't touch any animation transition so far. Recently one of my script users requested animation transition into my script, so I tried to implement this feature.

Fortunately my script has already been using a timer (setInterval) to keep the proper position and size for a image against the browser window.

Once the corresponding anchor is clicked, _show method will be called. The lightbox will start a timer in _show as follows:

self._timer = window.setInterval( function() { self._run() }, 20);

_run method is a callback of the timer, so it will be called priodically. Animation transition is not main functionality for my lightbox, so I've made do with simple implementation.

I've added new member variable _anim.step to check the current state regrding animation.