prettyPhoto is a jQuery based lightbox clone. Not only does it support images, it also add support for videos, flash, YouTube, iFrames. It’s a full blown media lightbox. The setup is easy and quick, plus the script is compatible in every major browser.
A few jQuery functions like .map or .inArray are used this way:
jQuery.inArray(/**/)
As in Pretty Photo plugin a jQuery variable is passed using an anonymous function:
(function($) {
// plugin code
})(jQuery);
A safer option is to use $ variable all along the way inside a plugin code. It's very important when you deal with a few versions of jQuery at the same time on the single web page since it can take a jQuery version without .map function or something like that. The other reason is a consistency.
A few jQuery functions like .map or .inArray are used this way:
As in Pretty Photo plugin a jQuery variable is passed using an anonymous function:
A safer option is to use $ variable all along the way inside a plugin code. It's very important when you deal with a few versions of jQuery at the same time on the single web page since it can take a jQuery version without .map function or something like that. The other reason is a consistency.