1jQuery(document).ready(function($) { 2 3 // Stop accordion and tab clicks from toggling the mobile menu icon 4 $(document).on("click", "a[data-vc-accordion], a[data-vc-tabs]", function(e) { 5 e.stopImmediatePropagation(); 6 }); 7 8 // Mobile nav toggle 9 $("button#primary-mobile-menu.display-small-desktop").click(function() { 10 $("nav#mobile-site-navigation ul.mobile-menu").toggleClass("toggled"); 11 $("nav#mobile-site-navigation ul.mobile-menu").slideToggle("fast"); 12 $("nav#mobile-site-navigation div.mobile-menu ul").toggleClass("toggled"); 13 $("nav#mobile-site-navigation div.mobile-menu ul").slideToggle("fast"); 14 // $("nav#mobile-site-navigation").toggleClass("toggled-on"); 15 }); 16 17 // insert the button above the 1st-level sub-menu in the DOM 18 $("<button class='sub-menu-toggle' aria-expanded='false'></button>").insertBefore("ul#top-menu li ul"); 19 $("<button class='sub-menu-toggle' aria-expanded='false'></button>").insertBefore("ul#left-menu li ul"); 20 $("<button class='sub-menu-toggle' aria-expanded='false'></button>").insertBefore("ul#right-menu li ul"); 21 22 // ******* 23 // It seems the twentytwentyfive parent theme may have fixed the need for this, which is why it's commented out. 24 // ******* 25 // Add 2nd-level mobile subnav toggle (THIS HAS TO BE ABOVE THE CLICK FUNCTION) 26 // insert the button above the 2nd-level sub-menu in the DOM 27 // $("<button class='sub-menu-toggle'></button>").insertBefore("ul.mobile-menu li ul li.menu-item-has-children ul.sub-menu"); 28 // END Add 2nd-level mobile subnav toggle (THIS HAS TO BE ABOVE THE CLICK FUNCTION) 29 // ******* 30 // END It seems... 31 // ******* 32 33 // Mobile subnav toggle 34 $("ul.mobile-menu button.sub-menu-toggle").click(function() { 35 $(this).next("ul.sub-menu").slideToggle("fast"); 36 $(this).toggleClass("toggled"); 37 // $(this).next("ul.sub-menu").toggleClass("sub-toggled-on"); 38 }); 39 40 // Hamburger header nav toggle 41 $(".hamburger-header button#primary-mobile-menu.no-hides").click(function() { 42 $("nav#mobile-site-navigation ul.mobile-menu").slideToggle("fast"); 43 $("nav#mobile-site-navigation ul.mobile-menu").toggleClass("toggled"); 44 // $("nav#site-navigation").toggleClass("toggled-on"); 45 }); 46 47 // Add classes to blog pagination buttons (function generated) 48 $(".left-pag a").addClass("btn-bt default"); 49 $(".right-pag a").addClass("btn-bt default"); 50 $(".single-pagination .nav-links > div a").addClass("btn-bt default"); 51 52 // Click to Expand 53 $(".hider-toggle").click(function() { 54 55 var $toggle = $(this); 56 var $text = $toggle.prev(".hider-text"); 57 58 if ($text.hasClass("expanded")) { 59 // Collapse 60 $text.removeClass("expanded").animate({ height: "0px" }, 300, function() { 61 // $text.removeClass("expanded").animate({ height: "200px" }, 300, function() { 62 $text.css("overflow", "hidden"); 63 }); 64 $toggle.removeClass("open").text("Click to Expand"); 65 } else { 66 // Expand 67 var fullHeight = $text.get(0).scrollHeight; 68 $text.addClass("expanded").animate({ height: fullHeight }, 300, function() { 69 $text.css({ height: "auto", overflow: "visible" }); 70 }); 71 $toggle.addClass("open").text("Collapse"); 72 } 73 }); 74 75 // Click to Expand - LEADERSHIP PAGE 76 $(".team-hider-toggle").click(function() { 77 78 var $toggle = $(this); 79 var $text = $toggle.prev(".team-hider-text"); 80 81 if ($text.hasClass("team-expanded")) { 82 // Collapse 83 $text.removeClass("team-expanded").animate({ height: "275px" }, 300, function() { 84 // $text.removeClass("expanded").animate({ height: "200px" }, 300, function() { 85 $text.css("overflow", "hidden"); 86 }); 87 $toggle.removeClass("team-open").text("Click to Expand"); 88 } else { 89 // Expand 90 var fullHeight = $text.get(0).scrollHeight; 91 $text.addClass("team-expanded").animate({ height: fullHeight }, 300, function() { 92 $text.css({ height: "auto", overflow: "visible" }); 93 }); 94 $toggle.addClass("team-open").text("Collapse"); 95 } 96 }); 97 98 // wraps 99 $(".footer-col-3 h2.widget-title").wrap("<a class='wrapped-with-jquery widget-title-link' href='/service-areas'></a>"); 100
101 // add schedule engine button class to nav menu item 102 $("li.top-widget-schedule a").addClass("se-booking-show"); 103 104}); 105 106/* Scroll to top Button */ 107jQuery(document).ready(function($) { 108 var offset = 100; 109 var speed = 250; 110 var duration = 500; 111 $(window).scroll(function() { 112 if ($(this).scrollTop() < offset) { 113 $('.topbutton').fadeOut(duration); 114 } else { 115 $('.topbutton').fadeIn(duration); 116 } 117 }); 118 $('.topbutton').on('click', function() { 119 $('html, body').animate({scrollTop:0}, speed); 120 return false; 121 }); 122}); 123 124/* prevents WPbakery tabs and accordions from sliding down to footer, then back up */ 125jQuery( function($) { 126 $(document).on('click', 'li.vc_tta-tab a,li.vc_tta-tab,.vc_tta-panel-title', function(){ 127 $('html, body').stop(); 128 }); 129}); 130 131/* Header Scroll Add/Remove Class */ 132$(function() { 133 $(window).on("scroll", function() { 134 if($(window).scrollTop() > 50) { 135 $(".site-header").addClass("scrolling"); 136 $("body").addClass("scrolling"); 137 } else { 138 //remove the background property so it comes transparent again (defined in your css) 139 $(".site-header").removeClass("scrolling"); 140 $("body").removeClass("scrolling"); 141 } 142 }); 143}); 144 145// REMOVE THE SLIDE FOR THE PAGE YOU ARE ALREADY ON IN WP CAROUSEL SLIDERS 146jQuery(function($) { 147 // Current page path (relative URL) 148 const currentPath = window.location.pathname.replace(/\/$/, ''); // remove trailing slash 149 150 // Loop through actual Swiper slides 151 $('.swiper-slide').each(function() { 152 const slideLink = $(this).find('a').first().attr('href'); 153 if (!slideLink) return; 154 155 // Normalize paths to remove trailing slashes 156 const normalizedSlidePath = slideLink.replace(/\/$/, ''); 157 158 if (normalizedSlidePath === currentPath) { 159 $(this).remove(); // Remove the slide 160 } 161 }); 162 163 // Update Swiper carousels 164 $('.wpcp-carousel-wrapper').each(function() { 165 const swiperInstance = $(this).find('.swiper')[0]?.swiper; 166 if (swiperInstance) { 167 swiperInstance.update(); 168 if (swiperInstance.pagination) swiperInstance.pagination.update(); 169 } 170 }); 171}); 172 173// ********** SLICK ********** // 174jQuery(document).ready(function($){ 175 // start new slider 176 $('.specials-carousel').slick({ 177 // adaptiveHeight: true, 178 autoplaySpeed: 3000, 179 swipeToSlide: true, 180 slidesToScroll: 1, 181 slidesToShow: 3, 182 draggable: true, 183 autoplay: true, 184 infinite: true, 185 arrows: false, 186 dots: false, 187 speed: 500, 188 responsive: [ 189 { 190 breakpoint: 1441, 191 settings: { 192 slidesToShow: 2, 193 } 194 }, 195 { 196 breakpoint: 1025, 197 settings: { 198 adaptiveHeight: true, 199 slidesToShow: 1, 200 dots: true, 201 } 202 }, 203 // { 204 // breakpoint: 481, 205 // settings: { 206 // slidesToShow: 1, 207 // } 208 // } 209 ] 210 }); 211 //end of slider 212}); 213 214// Shuffle.js 215jQuery(document).ready(function ($) { 216 217 if (!$('#specialsGrid').length || typeof Shuffle === 'undefined') return; 218 219 // Initialize Shuffle 220 var shuffleInstance = new Shuffle(document.getElementById('specialsGrid'), { 221 itemSelector: '.special-item', 222 sizer: null, // optional, leave null if no masonry sizing 223 speed: 400, // animation duration in ms 224 easing: 'ease', // easing style 225 }); 226 227 // -------- Filter buttons -------- 228 $('.special-filters button').on('click', function () { 229 var group = $(this).data('group'); 230 231 // Apply filter 232 if (group === 'all') { 233 shuffleInstance.filter(Shuffle.ALL_ITEMS); 234 } else { 235 shuffleInstance.filter(group); 236 } 237 238 // Update active class 239 $('.special-filters button').removeClass('active'); 240 $(this).addClass('active'); 241 }); 242 243 // -------- Anchor links / external links -------- 244 $('.filter-link').on('click', function (e) { 245 e.preventDefault(); 246 var group = $(this).data('group'); 247 if (!group) return; 248 249 // Apply Shuffle filter 250 if (group === 'all') { 251 shuffleInstance.filter(Shuffle.ALL_ITEMS); 252 } else { 253 shuffleInstance.filter(group); 254 } 255 256 // Highlight button if exists 257 $('.special-filters button').removeClass('active'); 258 $('.special-filters button[data-group="' + group + '"]').addClass('active'); 259 260 // Optional: scroll to grid 261 $('html, body').animate({ 262 scrollTop: $('#specialsGrid').offset().top - 20 263 }, 500); 264 }); 265 266 // -------- Check URL hash on page load -------- 267 var hash = window.location.hash.replace('#', ''); 268 if (hash) { 269 if (hash === 'all') { 270 shuffleInstance.filter(Shuffle.ALL_ITEMS); 271 } else {
272 shuffleInstance.filter(hash); 273 } 274 275 // Highlight corresponding button 276 $('.special-filters button').removeClass('active'); 277 $('.special-filters button[data-group="' + hash + '"]').addClass('active'); 278 279 // Optional: scroll to grid 280 $('html, body').animate({ 281 scrollTop: $('#specialsGrid').offset().top - 20 282 }, 500); 283 } 284 285 // -------- Initialize GLightbox -------- 286 // var lightbox = GLightbox({ 287 // selector: '.glightbox', 288 // touchNavigation: true, 289 // loop: true, 290 // zoomable: true, 291 // autoplayVideos: false, 292 // }); 293 294});
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.