1/* ========================================== Start Of Header Fixed Javascript ========================================== */ 2jQuery(window).scroll(function () { 3 if (jQuery(window).scrollTop() >= 100) { 4 jQuery('.header').addClass('fixed-header'); 5 6 } else { 7 jQuery('.header').removeClass('fixed-header'); 8 9 } 10}); 11/* ========================================== End Of Header Fixed Javascript ========================================== */ 12 13 14/* ========================================== Start Of Toggle Javascript ========================================== */ 15var jQuery = jQuery.noConflict(); 16jQuery(document).ready(function(){ 17 // Insert sub-click span before each sub-menu 18 jQuery(".header-menu .menu-item-has-children .sub-menu").each(function() { 19 jQuery(this).before(jQuery("<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>")); 20 }); 21 22 // Menu toggle 23 jQuery('.mobile-button').click(function() { 24 jQuery(this).toggleClass('button-active'); 25 jQuery('.header-menu').toggleClass('menu-open'); 26 }); 27 // Sub Menu 28 if (jQuery(window).width() < 1199){ 29 // Prepend back button to sub menu(s) 30 jQuery('.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>'); 31 32 // Trigger sub menu 33 jQuery(document).on('click', '.sub-click', function (e) { 34 console.log('clicked'); 35 jQuery(this).siblings('.sub-menu').addClass('is-active'); 36 }); 37 38 // Close out sub menu 39 jQuery('.sub-menu .sub-close').click(function (e) { 40 // e.preventDefault(); 41 jQuery(this).closest('.sub-menu').removeClass('is-active'); 42 }); 43 } 44}); 45 46/* ========================================== End Of Toggle Javascript ========================================== */ 47 48 49/* ========================================== Start Of Gravity Forms Validation Javascript ========================================== */ 50jQuery(document).ready(function () { 51 gform.addFilter('gform_datepicker_options_pre_init', function (optionsObj, formId, fieldId) { 52 optionsObj.minDate = 0; // Disables past dates only 53 return optionsObj; 54 }); 55 56 // Allow only letters, hyphens, and spaces 57 jQuery('.only-letters-field').keypress(function (e) { 58 var txt = String.fromCharCode(e.which); 59 if (!txt.match(/[a-zA-Z\- ]/)) { 60 return false; 61 } 62 }); 63}); 64/* ========================================== End Of Gravity Forms Validation Javascript ========================================== */ 65/* ========================================== Start Of Doctor Thumbnail Javascript ========================================== */ 66let currentIndex = 0; 67const slides = document.querySelectorAll('.doctor-slider .team-member'); 68const thumbnails = document.querySelectorAll('.doctor-thumbnail-slider .team-member'); 69let autoplayInterval; 70const autoplayDelay = 5000; 71 72function changeSlide(index) { 73 if (index < 0) { 74 index = slides.length - 1; 75 } else if (index >= slides.length) { 76 index = 0; 77 } 78
79 slides.forEach(slide => slide.classList.remove('active')); 80 thumbnails.forEach(thumb => thumb.classList.remove('active')); 81 slides[index].classList.add('active'); 82 thumbnails[index].classList.add('active'); 83 currentIndex = index; 84} 85 86function startAutoplay() { 87 autoplayInterval = setInterval(() => { 88 changeSlide(currentIndex + 1); 89 }, autoplayDelay); 90} 91 92function stopAutoplay() { 93 clearInterval(autoplayInterval); 94} 95 96document.addEventListener("DOMContentLoaded", function() { 97 if (slides.length > 0 && thumbnails.length > 0) { 98 slides[0].classList.add('active'); 99 thumbnails[0].classList.add('active'); 100 startAutoplay(); 101 } 102}); 103 104thumbnails.forEach((thumb, index) => { 105 thumb.addEventListener('click', () => { 106 changeSlide(index); 107 stopAutoplay(); 108 }); 109}); 110/* ========================================== End Of Doctor Thumbnail Javascript ========================================== */
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.