The _jquery of the graphics and text auto-carousel effect of jquery implementation

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.