cycle-plugin

jQuery Cycle Plugin - Dictate locaton of thumbnails

落爺英雄遲暮 提交于 2019-12-20 04:30:25
问题 What I would like to do is dictate where my thumbnails are instead of using the main images as the thumbnail. I'm pretty sure this can be done, I just need a little push in the right direction. Here is my Code: <script type="text/javascript"> $('#imageContainer').before('').cycle({ fx: 'fade', speed: 2000, timeout: 8000, pager: '#nav', // callback fn that creates a thumbnail to use as pager anchor pagerAnchorBuilder: function(i, slide) { return '<li><a href="#"><img src="' + slide.src + '"

Jquery img.load question

感情迁移 提交于 2019-11-30 05:32:08
I am using the jQuery cycle plugin to cycle through some images. These images are all contained inside a DIV. I don't want the cycle plugin to run until after all of the images have loaded, or at least the first 4 or 5 so that an image doesn't appear that isn't loaded yet. Is there an easy way of doing this? I tried adding a class 'lastImg' to the last img in the div and adding a 'load' event to that e.g. Markup <div id='cycle'> <img src=''/> <img src=''/> <img src='' class='lastImg'/> </div> JQuery $('lastImg').load(function(){ $('#cycle').cycle({..}); }); This seems okay in Chrome and FF,

Jquery img.load question

别说谁变了你拦得住时间么 提交于 2019-11-29 04:14:26
问题 I am using the jQuery cycle plugin to cycle through some images. These images are all contained inside a DIV. I don't want the cycle plugin to run until after all of the images have loaded, or at least the first 4 or 5 so that an image doesn't appear that isn't loaded yet. Is there an easy way of doing this? I tried adding a class 'lastImg' to the last img in the div and adding a 'load' event to that e.g. Markup <div id='cycle'> <img src=''/> <img src=''/> <img src='' class='lastImg'/> </div>