• Home
  • JQuery gallery with pop up and next button

JQuery gallery with pop up and next button

December 30, 2011 Ning 0 Comments

View demo click here
Download demo


PHP
The idea is simple – our PHP back-end is going to scan a folder that we’ve set up with our gallery images, and turn it into a fancy CSS & jQuery gallery. The great thing about this strategy is that it is incredibly easy to set up a gallery, and adding images to an existing one is a charm – just dump them in the gallery’s directory via FTP and it is ready to go.


		'.$title.'
		
'; $i++; } } closedir($dir_handle); ?>

explode eturns an array of strings, each of which is a substring of string formed by splitting it on boundaries formed by the string delimiter.

array_pop() pops and returns the last value of the array, shortening the array by one element. If array is empty (or is not an array), NULL will be returned. Will additionally produce a Warning when called on a non-array.

strtolower Returns string with all alphabetic characters converted to lowercase.

implode Join array elements with a string

htmlspecialchars() example

$new = htmlspecialchars("Test", ENT_QUOTES);
echo $new; // <a href='test'>Test</a>

in_array Checks if a value exists in an array


JQUERY
* jQuery lightBox plugin
* This jQuery plugin was inspired and based on Lightbox 2 by Lokesh Dhakar (http://www.huddletogether.com/projects/lightbox2/)

$(document).ready(function(){
	
	$('.pic a').lightBox({
		
		imageLoading: 'lightbox/images/loading.gif',
		imageBtnClose: 'lightbox/images/close.gif',
		imageBtnPrev: 'lightbox/images/prev.gif',
		imageBtnNext: 'lightbox/images/next.gif'

	});
	
});

leave a comment

*