1
0
mirror of https://codeberg.org/nobody/LocalCDN.git synced 2024-12-25 09:40:38 +01:00
LocalCDN-Firefox-Chrome-Brave/resources/jquery.cycle2/2.1.6/jquery.cycle2.lookahead.min.jsm
2021-03-17 18:50:41 +01:00

2 lines
528 B
JavaScript

(function($){"use strict";$(document).on("cycle-initialized",function(e,opts){var key="cycle-look-ahead";opts.container.on("cycle-before",function(e,opts,outgoing,incoming,fwd){var index=fwd?opts.nextSlide+1:opts.nextSlide-1,slide=$(opts.slides[index]),images;if(slide.length&&!slide.data(key)){slide.data(key,true);images=slide.is("img[data-cycle-src]")?slide:slide.find("img[data-cycle-src]");images.each(function(){var img=$(this);img.attr("src",img.attr("data-cycle-src"));img.removeAttr("data-cycle-src")})}})})})(jQuery);