Dynamic Image Gallery

This is a javascript gallery using the gallery.js & slimbox.js plugins for jquery.
You simply add photos to a folder titled ‘gallery’, and the script will automatically add them to the gallery script. The photos are set to rotate automatically at 5 second intervals by default.

You can see the Demo here: http://is.gd/jvLSU
& download all the necessary .js files.

<div id="wrapper"> <div id="slideShow"> <div id="slideShowItems"> <?php // Loading images dynamically // Default height size is set to 275px; with is 500px $files=glob("gallery/*.jpg*", GLOB_NOSORT); $firstfile=reset($files); foreach($files as $file){ if($firstfile==$file){ echo "\t <div class=\"imgfs\"><a href=\"".$file."\" rel=\"lightbox-gallery\" title=\"click to view larger\"><img src=\"".$file."\" height=\"275\" /></a></div> \n"; }else{ echo "\t <div class=\"imgfs\"><a href=\"".$file."\" rel=\"lightbox-gallery\" title=\"click to view larger\" ><img src=\"".$file."\" height=\"275\" /></a></div> \n"; } } ?> </div> </div> <ul id="slideShowCount"> </ul> </div> <!-- // closes wrapper --> [feedly mini]

Related Articles

Leave a Reply