Answer the question
In order to leave comments, you need to log in
Image carousel for an online store?
I would like to display not one picture on the page of the section with the goods of the online store, but immediately all that is assigned to this product - in the form of a carousel, changing pictures after a short time interval.
Please let me know if someone has already done something like this. JCarusel and other fancy carousels load too much and hang when there are a large number of goods. We need something very light, preferably in jQuery.
Answer the question
In order to leave comments, you need to log in
for example, plugins.jquery.com/project/Sideswap and then search there for the word "rotator"
If you need a very small and simple one, then here, I wrote a banner scroller for myself, 384 bytes: 2sane.ru/js/cycler.min.js , source: 2sane.ru/js/cycler.js Put
as many pictures as you need in any div, and in script write something like:
$('.advert-item').cycle({
interval: 4000,
speed: 1000
});
Here's another try: www.gmarwaha.com/jquery/jcarousellite/ , I always use it myself, weighs only 2 kb, and a lot of features.
The performance issue is usually not the ease of implementation of the carousel, but rather the use of it. Often I had to deal with a similar task and here are a couple of tips for speeding up:
1. Try to use pictures of the smallest possible size.
2. Try to use the least number of images, no need to make a huge sheet of tens of thousands of pixels.
3. Try to avoid asynchronous requests to the server during the animation.
4. Increase animation time and interval.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question