1(function($) { 2 3 function slideshowControls(opts) { 4 //---- Listeners 5 $(opts.pager).find('span').click(function() { 6 opts.slideshow.cycle('pause'); 7 opts.play.show(); 8 opts.pause.hide(); 9 }); 10 opts.play.click(function() { 11 opts.slideshow.cycle('resume'); 12 opts.play.hide(); 13 opts.pause.show(); 14 }); 15 opts.pause.click(function() { 16 opts.slideshow.cycle('pause'); 17 opts.play.show(); 18 opts.pause.hide(); 19 }); 20 } 21 22 function start(opts) { 23 var slideshow = (!opts || opts.slideshow == undefined) ? $('.fsm_slideshow') : opts.slideshow; 24 var defaults = { 25 slideshow: slideshow, 26 slides: slideshow.find('> ul > li'), 27 pager: slideshow.find('.pager'), 28 prev: slideshow.find('.prev'), 29 next: slideshow.find('.next'), 30 play: slideshow.find('.play'), 31 pause: slideshow.find('.pause'), 32 fx: 'fade', 33 random: false, 34 allowWrap: true, 35 autoHeight: 'calc', 36 swipe: true 37 } 38 opts = $.extend(defaults, opts); 39 40 $(opts.slideshow).cycle(opts); 41 slideshowControls(opts); 42 43 } 44 45 $(document).ready(function() { 46 $('.fsm_slideshow').each(function() { 47 var slideshow = $(this); 48 var opts = { 49 slideshow: slideshow, 50 fx: slideshow.attr('data-fx'), 51 speed: parseInt(slideshow.attr('data-speed')), 52 timeout: parseInt(slideshow.attr('data-timeout')), 53 random: (slideshow.attr('data-random') === 'true'), 54 allowWrap: (slideshow.attr('data-wrap') === 'true') 55 } 56 start(opts); 57 }); 58 }); 59 60})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.