开发者

Jcarousel ajax - how to (ajax) load image before the slide?

开发者 https://www.devze.com 2023-01-28 02:02 出处:网络
I love Jcarousel, but their method to allow a nice image slide is to preload images, and I want to save bandwidth and page loading time.

I love Jcarousel, but their method to allow a nice image slide is to preload images, and I want to save bandwidth and page loading time.

My goal: - First step should only load and display a single image. No second image should be loaded - When click on next or prev occurs, I want the image to be added via ajax, then have the slide effect.

In other words, I would like to be able to display a regular single image on my page, until the user click any of the prev or next button. this way if there is no click no useless 开发者_StackOverflow社区image are loaded.

Anybody have tried this before ?


I have implemented jcaraousel,

I load only four images per page , when the user click i get the next four images.Do the following

1) get the no of images you want 2) when user clicks next , swap the existing image src with the next one.

If you want to give a loading effect , give a default loading gif image as a background image to those.We implemented the same at ...www.allposters.com , please check if you want a working demo.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号