jQuery programming implements a set of 8 pictures. When entering the web page, the first 4 pictures are displayed initially, and then it automatically scrolls to the left until the screen stops scrolling when the last 4 pictures are displayed.
The following is the jQuery code:
$(document) .ready(function() {
var $images = $('#images img');
var imgs = $images.length;
var next_img;
for(var i=0; i
next_img=$images.eq(i);
scroll(next_img);
}
});
//Create a scrolling function, use animate function custom animation
function scroll(image) {
image.animate({'left':-485},5000);
};