A simple way to slide images using jquery

Nithadeepak
Posted by Nithadeepak under jQuery category on | Points: 40 | Views : 4189
in aspx page


<img id="imageSlide" alt="" src="../images/w1.jpg" height="300px" width="430px" />


in JqueryScript.js
var imgs = ['../images/jew2.jpg',
'../images/k1.jpg',
'../images/lap1.jpg','../images/jew1.jpg', '../images/mob1.jpg', '../images/kid1.jpg'];
var cnt = imgs.length;
$(function() {
setInterval(Slider, 3000);
});
function Slider() {
$('#imageSlide').fadeOut("slow", function() {
$(this).attr('src', imgs[(imgs.length++) % cnt]).fadeIn("slow");
});
}

Comments or Responses

Login to post response