NextIndexPrevious

Programs in JQuery

2. Program to create image slider.
<script src="jquery-1.9.1.js"></script>
<script src="jquery.cycle.all.js"></script>
<script>
function slider()
{
	$("#div1").cycle({fx:'scrollLeft'})
}
</script>
<body onload="slider()">
<div id="div1" style="position:absolute;top:100;left:100;">
<img src="1.jpg" width="200">
<img src="2.jpg" width="200">
<img src="3.jpg" width="200">
<img src="4.jpg" width="200">
</div>
</body>
Output :

first image second image third image fourth image




Creater of JQuery


John Resig

John Resig

Born: May 8, 1984, Boston, U.S.A.