PageSourceSearch

https://www.hotelrmblue.com/wp-content/themes/pro-theme-sequoia/bl…/slideshow/assets/js/slideshow.js?ver=1.0.0

js hotelrmblue.com collected 2026-10-01 16:37:09 UTC 3,709 bytes, 112 lines download raw bytes

1( function ($) {
2
3    $(document).ready(function () {
4        doSlideshow();
5        ShowStuffOnSlideShow()
6    });
7
8
9    function ShowStuffOnSlideShow() {
10        var slideshowPlusBF = $('.slideshow_container.size_xl + .booking_form_section.static.inline');
11        if(slideshowPlusBF.length == 0){
12            $('.slideshow_container .address').fadeIn();
13            $('#main_book_on_slideshow').fadeIn();
14        }
15    }
16
17    function lazySlide(array, index) {
18        var sources = $(array[index]).find('source');
19        var img = $(array[index]).find('img');
20        var src = img.attr('data-src');
21
22        sources.each(function () {
23            var source = $(this).attr('data-srcset');
24            $(this).attr('srcset', source);
25            $(this).attr('data-processed', 'true');
26            $(this).removeAttr('data-srcset');
27
28        });
29        img.attr('src', src);
30        img.attr('data-processed', 'true');
31        img.removeAttr('data-src');
32    }
33
34    function doSlideshow() {
35        var wrap = $('.slideshow');
36        var hasDots = dots;
37        var slides = wrap.find('.slide');
38        if(slides.length <= 1){
39            hasDots = false;
40        }
41        if (wrap.length > 0) {
42
43            //LAZY LOADING (before carousel is loaded)
44            wrap.on("init", function () {
45                //load 1st, 2nd and last slide
46                var slidesLoaded = [slides[0], slides[1], slides[ss_lenght - 1]];
47                //items index change based on animation kind (0 to n-1 for fade, 1 to n for slide)
48                if (animation === false) {
49                    slidesLoaded = [slides[1], slides[2], slides[ss_lenght]];
50                }
51                slides.each(function (index) {
52                    lazySlide(slidesLoaded, index);
53                })
54            });
55            //slideshow setup
56            wrap.slick({
57                rtl: rtl,
58                rows: 0,
59                fade: animation,
60                pauseOnHover: false,
61                pauseOnFocus: false,
62                autoplay: autoplay,
63                arrows: arrows,
64                dots: hasDots,
65                infinite: true,
66                autoplaySpeed: autoplaySpeed,
67                speed: animationSpeed,
68                nextArrow: wrap.parent().find('.next'),
69                prevArrow: wrap.parent().find('.prev'),
70                appendDots: wrap.parent().find('.pager')
71            });
72        }
73
74        //LAZY LOADING (after carousel is loaded)
75
76        //load 1st, 2nd and last clone
77        var clones = wrap.find('.slick-cloned');
78        var clonesLoaded = [clones[0], clones[1], clones[ss_lenght - 1]];
79
80        //items index change based on animation kind (0 to n-1 for fade, -1 to n-2 for slide)
81        if (animation === false) {
82            clonesLoaded = [clones[0], clones[1], clones[2]];
83        }
84        clones.each(function (index) {
85            lazySlide(clonesLoaded, index);
86        });
87
88        wrap.on("afterChange", function (e, slick) {
89            var slides = $.merge(slick.$slides, clones);
90
91            //load next slide + 1
92            var index = slick.currentSlide + 1;
93
94            lazySlide(slides, index);
95
96            //load previous slide - 1
97            if (slick.currentSlide === 0) {
98                index = ss_lenght - 1;
99            } else {
100                index = slick.currentSlide - 1;
101            }
102            lazySlide(slides, index);
103
104            //load current slide if click on pager
105            var indexCurrent = slick.currentSlide;
106
107            lazySlide(slides, indexCurrent);
108        });
109    }
110
111
112}(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.