ImageSlider - Scroll through photo thumbnails Print

  • 0

In-class Shop. Scroll through photo thumbnails under the main photo of the product.

The parameters in the JS

Because the class is assigned to the Shop, all parameters must be set before the domready event or the latest featuresconditional Shop.imageSlider.condition()

Parameters Shop.imageSlider.options :

  • container (object DOM) - a container for all the photos
  • left_arrow_img (string) - url to the picture with an arrow to the left
  • right_arrow_img (string) - url the picture with the arrow to the right
  • left_delta (int) - jump when you click on the arrow to the left by default, -2
  • right_delta (int) - jump when you click on the arrow to the right, by default, 2
  • galleryclass (string) - the second class of the container, inside container

imageSlider requires the following structure DOM:

  • container
    • galleryclass
      • <ul>
        • <li> - for each photo
          • <img> - miniature

In the application of any <img> There is also a <a>, It is used by the gallery.

Action

The width is measured all the images and container. If there are more images created are two arrows, and all the unseen like pictures (their <li>) given a class none. Arrows <img> receive events onClick, that cause „wandering” class. none aboutleft_delta and right_delta places.


Was this answer helpful?

« Back