Javascript image slider

imgsjs uses jquery as a helping library, include inside head tag.


	<link rel="stylesheet" type="text/css" href="css/style.css">	
	<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script>
	<script type="text/javascript" src="js/imgsjs.js"></script>
				
		

To initialise imgsjs, first create dom element to hold the slider. For example:


	<div id='image-slider'></div>

image-slider div element will be used only as a hook to attach our slider. Next we hook the slider and initialise it.


	// sliderImgs will be names of the pictures we want to load, see imgsjs code
	// for more details.
	var sliderImgs = [
		{ url: 'img/i1.jpg' },
		{ url: 'img/i2.jpg' },
		{ url: 'img/i3.jpg' },
		{ url: 'img/i4.jpg' }
	];

	var slider = IMGS.createImageSlider(document.getElementById('image-slider'));
	slider.init(sliderImgs, true);
	//slider.startAutoPlay(5000);
	slider.setFadeDuration(1000);

That's pretty much it, see setFadeDuration & startAutoPlay function in source for more info on what these functions do.

Enjoy using imgsjs slider. Have fun! :)