I came across a jQuery lightbox plug-in called PrettyPhoto. Seems very interesting. At the bottom of documentation I noticed a section about Public API, which I paste in its entirety below:
Version 2.5 introduced an easy to use API. You can now open prettyPhoto from anywere. The public API functions are the following:
$.prettyPhoto.open('images/fullscreen/image.jpg','Title','Description');
$.prettyPhoto.changePage('next');
$.prettyPhoto.changePage('previous');
$.prettyPhoto.close();
You can also open galleries using the API, just pass arrays to the open function.
images = ['images/fullscreen/image1.jpg','images/fullscreen/image2.jpg','images/fullscreen/image3.jpg'];
titles = ['Title 1','Title 2','Title 3'];
descriptions = ['Description 1','Description 2','Description 3']
$.prettyPhoto.open(images,titles,descriptions);
You can now open prettyPhoto from Flash or launch is from anywhere, anytime!
Great! I want to try it, but I have never dealt with APIs and have no idea how and where to plug the API code provided.
Can I create some sort of widget that will allow people placing it on other sites and open pictures there from my site? I'm lost. Google search did not yield any demos of its implementations.
Any nudge in the write direction will be highly appreciated.