PageSourceSearch

https://www.westcliffedental.ca/wp-content/themes/dentalmnv/js/custom.js?ver=1.0.0

js westcliffedental.ca collected 2026-10-04 05:05:03 UTC 11,666 bytes, 383 lines download raw bytes

1$(document).ready(function(){
2    //Menu
3    $(".site-header .main-navigation #primary-menu li.menu-item-has-children > a ").append($("<span class='sub-click'><svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 512'><path d='M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z'/></svg></span>"));
4    //Menu
5    $('.mobile-button').click(function(){
6        $(this).toggleClass('button-active');
7        $('.main-navigation').toggleClass('menu-open');
8        // $('.main-navigation, body,.mobile-menu-overlay').toggleClass('menu-open')
9    });
10    // Sub Menu
11    if ($(window).width() < 767){
12        // Prepend back button to sub menu(s)
13        $('.sub-menu').prepend('<li class="menu-item"><a class="sub-close" href="#"><svg xmlns="http://www.w3.org/2000/svg" height="10px" width="10px" viewBox="0 0 256 512"><path d="M9.4 278.6c-12.5-12.5-12.5-32.8 0-45.3l128-128c9.2-9.2 22.9-11.9 34.9-6.9s19.8 16.6 19.8 29.6l0 256c0 12.9-7.8 24.6-19.8 29.6s-25.7 2.2-34.9-6.9l-128-128z"/></svg> Back</a></li>');
14         // Trigger submenu toggle on clicking the <a> tag of menu items with children
15        $(document).on('click touchend', '.site-header .main-navigation #primary-menu li.menu-item-has-children > a', function (e) {
16            // Prevent the default action (navigation)
17            e.preventDefault();
18            
19            // Toggle the submenu visibility
20            var $submenu = $(this).siblings('.sub-menu');
21            
22            // Toggle 'is-active' class to show or hide the submenu
23            $submenu.toggleClass('is-active');
24        });
25        // Close out sub menu when 'Back' is clicked
26        $(document).on('click touchend', '.sub-menu .sub-close', function (e) {
27            e.preventDefault();
28            // Remove the 'is-active' class from the submenu
29            $(this).closest('.sub-menu').removeClass('is-active');
30        });
31  
32        // delaying text on home page banner slider
33        jQuery(".home .banner .absolute-content").delay(1000).fadeIn(500);
34    }
35
36    // Gallery
37    $('[data-fancybox="gallery"]').fancybox({
38        buttons: [
39          "slideShow",
40          "thumbs",
41          "zoom",
42          "fullScreen",
43          "share",
44          "close"
45        ],
46        loop: false,
47        protect: true
48      });
49
50    //   Testimonial Slider
51    $('.testimonial-slider').slick({
52        infinite: true,
53        slidesToShow: 1,
54        slidesToScroll: 1,
55        arrow: false,
56        dots: true,
57        autoplay: true,
58        autoplaySpeed: 3000
59      });
60
61
62    // Banner Slider
63    $('.banner ul').slick({
64        infinite: true,
65        slidesToShow: 1,
66        slidesToScroll: 1,
67        arrow: false,
68        dots: true,
69        autoplay: true,
70        autoplaySpeed: 10000
71      });
72
73    // Service Slider
74    $('.services-slider1').slick({            
75      dots: false,              
76      infinite: true,           
77      autoplay: true,              
78      autoplaySpeed: 2000,              
79      speed: 1000,  
80      draggable:false,            
81      slidesToShow: 4,                         
82      slidesToScroll: 1,            
83      arrows: true,        
84       respondTo: 'window',              
85          pauseOnHover: true,            
86          responsive: [                               
87              {                                
88              breakpoint: 1024,                                 
89                  settings: {                                 
90                  slidesToShow: 3,                                    
91                  infinite: true,                                 
92                  dots: false                               
93                  }                               
94              },                              
95              {                                 
96              breakpoint: 768,                                  
97              settings: {                                 
98                  slidesToShow: 1,                                    
99                  infinite: true,                                 
100                  dots: false                               
101                  }                               
102                }                           
103          ]           
104  });
105
106  //Staff Slider In Team Page
107    $('.custom-staff-list').slick({            
108      dots: false,              
109      infinite: true,           
110      autoplay: true,              
111      autoplaySpeed: 2000,              
112      speed: 1000,              
113      slidesToShow: 4,                         
114      slidesToScroll: 1,            
115      arrows: true,        
116       respondTo: 'window',              
117          pauseOnHover: true,            
118          responsive: [                               
119              {                                
120              breakpoint: 1024,                                 
121                  settings: {                                 
122                  slidesToShow: 3,                                    
123                  infinite: true,                                 
124                  dots: false                               
125                  }                               
126              },                              
127              {                                 
128              breakpoint: 768,                                  
129              settings: {                                 
130                  slidesToShow: 1,                                    
131                  infinite: true,                                 
132                  dots: false                               
133                  }                               
134                }                           
135          ]           
136  });
137
138    //   Testimonial Slider
139    $('.custom-team-list').slick({
140        infinite: true,
141        slidesToShow: 4,
142        slidesToScroll: 1,
143        arrow: false,
144        dots: false,
145        autoplay: true,
146        autoplaySpeed: 2000,
147        responsive: [
148            {
149              breakpoint: 1024,
150              settings: {
151                slidesToShow: 3,
152                slidesToScroll: 1,
153                infinite: false,
154                dots: false,
155                arrow: false
156              }
157            },
158            {
159              breakpoint: 767,
160              settings: {
161                slidesToShow: 2,
162                slidesToScroll: 1,
163                arrow: false
164              }
165            },
166            {
167              breakpoint: 420,
168              settings: {
169                slidesToShow: 1,
170                slidesToScroll: 1,
171                arrow: false
172              }
173            }
174            // You can unslick at a given breakpoint now by adding:
175            // settings: "unslick"
176            // instead of a settings object
177          ]
178        });
179
180        // Header Sticky
181
182        $(window).scroll(function(){
183          var sticky = $('#masthead'),
184           scroll = $(window).scrollTop();
185         
186          if (scroll >= 100) sticky.addClass('fixed');
187          else sticky.removeClass('fixed');
188        });
189                  
190});
191
192$( function() {
193  if ( jQuery.fn.vcAccordion && jQuery.fn.vcAccordion.Constructor) {
194    jQuery.fn.vcAccordion.Constructor.prototype.changeLocationHash = function() {};
195  }
196});
197
198
199
200
201jQuery(document).ready(function($) {
202
203    function initStickyForm() {
204
205        var $form = $('.sticky-side-form');
206        var $sidebar = $('.sticky-side');
207
208        if (!$form.length || !$sidebar.length || $(window).width() < 992) {
209            return;
210        }
211
212        if ($form.data('sticky-initialized')) {
213            return;
214        }
215
216        $form.data('sticky-initialized', true);
217
218        var originalWidth = 0;
219        var originalHeight = 0;
220        var originalOffset = null;
221
222        var $boundary = $sidebar.closest('.row').first();
223
224        if (!$boundary.length) {
225            $boundary = $sidebar;
226        }
227
228        var boundaryTop = 0;
229        var boundaryBottom = 0;
230
231        var $placeholder = $('<div class="sticky-side-form-placeholder"></div>');
232
233        $form.after($placeholder);
234
235        function calculateDimensions() {
236
237            resetForm();
238
239            originalWidth = $form.outerWidth();
240            originalHeight = $form.outerHeight();
241            originalOffset = $form.offset();
242
243            var boundaryOffset = $boundary.offset();
244
245            if (boundaryOffset) {
246
247                boundaryTop = boundaryOffset.top;
248
249                boundaryBottom =
250                    boundaryTop + $boundary.outerHeight();
251            }
252
253            $placeholder.css({
254                width: originalWidth + 'px',
255                height: originalHeight + 'px',
256                display: 'none'
257            });
258        }
259
260        calculateDimensions();
261
262        function updateStickyForm() {
263
264            if ($(window).width() < 992) {
265                resetForm();
266                return;
267            }
268
269            if (!originalOffset || !boundaryBottom) {
270                return;
271            }
272
273            var scrollTop = $(window).scrollTop();
274
275            var headerHeight = $('header').outerHeight() || 120;
276
277            var topOffset = headerHeight + 30;
278
279            var formStart = originalOffset.top;
280
281            var formBottomLimit =
282                boundaryBottom - originalHeight - 30;
283
284            if (scrollTop + topOffset <= formStart) {
285
286                resetForm();
287
288                return;
289            }
290
291            if (scrollTop + topOffset >= formBottomLimit) {
292
293                resetForm();
294
295                return;
296            }
297
298            var sidebarOffset = $sidebar.offset();
299
300            if (!sidebarOffset) {
301                return;
302            }
303
304            var sidebarWidth = $sidebar.outerWidth();
305
306            var leftPosition =
307                sidebarOffset.left +
308                sidebarWidth -
309                originalWidth;
310
311            $form
312                .addClass('is-sticky')
313                .removeClass('at-bottom')
314                .css({
315                    position: 'fixed',
316                    top: topOffset + 'px',
317                    left: leftPosition + 'px',
318                    right: 'auto',
319                    bottom: 'auto',
320                    width: originalWidth + 'px',
321                    height: 'auto',
322                    zIndex: 9999,
323                    opacity: '1',
324                    pointerEvents: 'auto'
325                });
326
327            $placeholder.show();
328        }
329
330        function resetForm() {
331
332            $form
333                .removeClass('is-sticky at-bottom')
334                .css({
335                    position: '',
336                    top: '',
337                    left: '',
338                    right: '',
339                    bottom: '',
340                    width: '',
341                    height: '',
342                    zIndex: '',
343                    opacity: '',
344                    pointerEvents: ''
345                });
346
347            $placeholder.hide();
348        }
349
350        $(window).on('scroll.stickyForm', function() {
351            updateStickyForm();
352        });
353
354        $(window).on('resize.stickyForm', function() {
355
356            if ($(window).width() < 992) {
357
358                resetForm();
359
360                return;
361            }
362
363            calculateDimensions();
364
365            updateStickyForm();
366        });
367
368        updateStickyForm();
369    }
370
371    $(window).on('load', function() {
372
373        setTimeout(function() {
374            initStickyForm();
375        }, 500);
376
377    });
378
379    setTimeout(function() {
380        initStickyForm();
381    }, 1000);
382
383});

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.