PageSourceSearch

https://www.dualchas.com/desktop/web/themes/frontend/dualchas/js/custom.js?v=1789541994

js dualchas.com collected 2026-10-02 11:41:31 UTC 4,768 bytes, 153 lines download raw bytes

1jQuery(document).ready(function ($) {
2    //Sticky
3    var stickyNav = function () {
4        //var bannerHeight = $('.header-banner').height();
5        var scrollTop = $(window).scrollTop() + 30;
6        if (scrollTop > 300) {
7            $('.sticky').addClass('fixed');
8        } else {
9            $('.sticky').removeClass('fixed');
10        }
11    };
12    stickyNav();
13    $(window).scroll(function () {
14        stickyNav();
15    });
16
17    //Back to top
18    var backtop = $('#to-top');
19    $(window).scroll(function() {
20      if ($(window).scrollTop() > 400) {
21        backtop.addClass('show-btt');
22      } else {
23        backtop.removeClass('show-btt');
24      }
25    });
26    backtop.on('click', function(e) {
27      e.preventDefault();
28      $('html, body').animate({scrollTop:0}, '400');
29    });
30
31    //Match height
32    $(function () {
33        $('.campervan-card .card-top').matchHeight({
34            byRow: true,
35            property: 'height',
36            target: null,
37            remove: false
38        });
39        $('.campervan-card .card-text').matchHeight({
40            byRow: true,
41            property: 'height',
42            target: null,
43            remove: false
44        });
45        $('.plan-item .content').matchHeight({
46            byRow: false,
47            property: 'height',
48            target: null,
49            remove: false
50        });
51        $('.plan-item .imgbx').matchHeight({
52            byRow: false,
53            property: 'height',
54            target: null,
55            remove: false
56        });
57    });
58
59    //Home video
60    if(document.getElementById("canvas")){
61        jQuery(document).ready(function($){
62            $("#homevideo").prop("muted", true);
63            $(".js-audio-control").click(function () {
64                if ($("#homevideo").prop("muted")) {
65                    $("#homevideo").prop("muted", false);
66                    $(this).addClass("unmuted");
67                    $(this).removeClass("muted");
68                } else {
69                    $("#homevideo").prop("muted", true);
70                    $(this).removeClass("unmuted");
71                    $(this).addClass("muted");
72                }
73                console.log($("#homevideo").prop("muted"));
74            });
75            document.getElementById("canvas").style.height = "0px";        
76         
77            var isIOS = /iPad|iPhone|iPod/.test(navigator.platform);
78            if(isIOS){ 
79                video.play();
80                var canvasVideo = new CanvasVideoPlayer({
81                    videoSelector: ".video",
82                    canvasSelector: ".canvas",
83                    timelineSelector: false,
84                    autoplay: true,
85                    makeLoop: true,
86                    pauseOnClick: false,
87                });
88            }else {
89                document.getElementById("canvas").style.display = "none";   //document.querySelectorAll(".canvas")[0].style.display = "none";
90            }
91        });
92    }
93
94    //Next Post Button Parallax TweenMax
95    $(".npLink").mousemove(function(e) {
96        parallaxIt(e, ".nxtPostImg", -30);
97    });
98    $(".npLink").mouseover(function(e) {
99        TweenMax.set(".nxtPostImg", {scale:"1.07"});
100    });
101    $(".npLink").mouseout(function(e) {
102        parallaxIt(e, ".nxtPostImg", 0);
103        TweenMax.set(".nxtPostImg", {scale:"1.005"});
104    });
105    function parallaxIt(e, target, movement) {
106        var $this = $(".npLink");
107        var relX = e.pageX - $this.offset().left;
108        var relY = e.pageY - $this.offset().top;
109    
110        TweenMax.to(target, 1, {
111        x: (relX - $this.width() / 2) / $this.width() * movement,
112        y: (relY - $this.height() / 2) / $this.height() * movement,
113        });
114        
115    };
116
117    //Slick Slider
118    if($('.banner-slider').length){
119        $('.banner-slider').slick({
120            autoplay: true,
121            autoplaySpeed: 4000,
122            fade: false,
123            speed: 1000,
124            pauseOnHover: false,
125            arrows: true,
126            dots: false 
127        });
128    }
129
130    if($('.home-testimonials').length){
131        $('.home-testimonials').slick({
132            autoplay: true,
133            autoplaySpeed: 10000,
134            speed: 1500,
135            arrows: true,
136            dots: false,
137            rows: 0,
138            slidesToShow: 3,
139            slidesToScroll: 1,
140            infinite: true,
141            responsive: [
142                {
143                    breakpoint: 991,
144                    settings: {
145                        slidesToShow: 1,
146                        slidesToScroll: 1
147                    }
148                }
149            ]
150        });
151    }
152
153});

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.