JQuery manually click to implement image carousel special effect _ jquery

Source: Internet
Author: User
This article mainly introduces jQuery manual click to implement image carousel special effects, and manual click on a digital card to implement image carousel, if you are interested in image carousel, you can refer to this article to write a carousel image trainer who first writes a carousel image that is manually clicked, then, I will gradually go into writing automatic carousel images and hover the mouse over images to stop moving the carousel images.
Next let's take a look at the final manual click carousel effect:

I. Principles

(1) The first is the carousel image architecture. I used a large p with the outermost side to wrap two small p S and put four pictures in one small p, put four numeric buttons in the other small p.

(2) set the width of the large p on the outermost side to the image width. If the width of the large p is exceeded, it must be hidden. However, set the width of the Small p on the image to 2000px, larger to facilitate left floating layout of four images

(3) When the number button is clicked, obtain the index value of the button to know the width of the Left shift of each image.

As shown in the figure above, the four images are floating and horizontal. When the number button is clicked, the image will be displayed in the parent frame according to the index value of the number button, because the image outside the parent frame will be hidden ~~~~~ If you still cannot understand the principle, I can only vomit blood ~~~~
Ii. Next let's look at the main program

   
   Slideshow ① (manually click slideshow)  
     

1 2 3 4

Related Article

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.