1/* 2 * Slick Slider to slide images 3 */ 4 5;(function($) { 6 7 var object; 8 var slickSlider; 9 10 /* 11 * Initialize Slider Slick 12 */ 13 function init(obj) { 14 if (obj.length > 0) { 15 object = obj; 16 slickSlider = object.slick(); 17 18 // deep linking of the slides 19 deepLinking(); 20 } 21 } 22 23 /* 24 * deeplinking of the slides 25 */ 26 function deepLinking() { 27 // check if goCustomOptions property exsist in options 28 if('goCustomOptions' in slickSlider.slick('getSlick').options) { 29 // check if any deeplinking settings is used to do the deeplinking 30 if('deeplinking' in slickSlider.slick('getSlick').options.goCustomOptions) { 31 // move to slide if hash for slide exist in the url hash 32 if(window.location.hash.indexOf('#slide-') != -1) { 33 slideToGo = window.location.hash.substr(7); 34 if(parseInt(slideToGo)) { 35 slickSlider.slick('getSlick').slickGoTo(slideToGo,true); 36 } 37 } 38 39 // On before slide change 40 slickSlider.on('afterChange', function(event, slick, currentSlide, nextSlide) { 41 window.location.hash = "#slide-"+currentSlide; 42 }); 43 } 44 } 45 } 46 47 /* 48 * Document Ready 49 */ 50 $(document).ready(function() { 51 init($(".slick-slider-images")); 52 }); 53})(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.