This article illustrates the automatic Carousel effect plug-in implemented by jquery. Share to everyone for your reference. as follows:
Intervalid = SetInterval (Cycleimage, slidetime); $ (". Main_image. Desc"). Show (); Show Picture $ (". Main_image. Block"). Animate ({opacity:0.85}, 1);
Set transparency//click and Hover Event $ (". Image_thumb ul Li:first"). AddClass (' active ');
$ (". Image_thumb ul li"). Click (function () {//set parameter var Imgalt = $ (this). FIND (' img '). attr ("alt");
var Imgtitle = $ (this). Find (' a '). attr ("href"); var Imgdesc = $ (this). Find ('. Block '). html ();
Gets html var imgdescheight = $ (". Main_image") from class block. Find ('. Block '). Height ();
Computes the height of the class block if ($ (this). is (". Active")) {//If activated, after the operation ... return false; else {//Animation action $ (". Main_image. Block"). Animate ({opacity:0, marginbottom:-imgdescheight}, up, function () {$ (". Main
_image. Block "). HTML (IMGDESC). Animate ({opacity:0.85,marginbottom:" 0 "}, 250);
$ (". Main_image img"). attr ({src:imgtitle, alt:imgalt});
});
} $ (". Image_thumb ul li"). Removeclass (' active ');
$ (this). addclass (' active ');
return false; }). Hover (function () {$ (this). addclass (' hover ');}, function () {$ (this). ReMoveclass (' hover ');
}); Toggle Teaser $ ("A.collapse"). Click (function () {$ (. main_image. Block). Slidetoggle (); $ ("A.collapse").
Toggleclass ("show");
});
I hope this article will help you with your jquery programming.