1jQuery(function($){ 2 $(window).scroll(function() { 3 var sticky = $('.navbar'), 4 scroll = $(window).scrollTop(); 5 6 if (scroll >= 100) { 7 sticky.addClass('sticky-header'); 8 $('.goto-top').addClass('hidden-goto-top'); 9 } 10 else { 11 sticky.removeClass('sticky-header'); 12 $('.goto-top').removeClass('hidden-goto-top'); 13 } 14 }); 15 16 $('#goto-top').on('click', function(e) { 17 e.preventDefault(); 18 $('html, body').animate({scrollTop:0}, '500'); 19 }); 20 21// $('a[href^="#"]').on('click', function(event) { 22// var target = $( $(this).attr('href') ); 23// if( target.length ) { 24// event.preventDefault(); 25// $('html, body').animate({ 26// scrollTop: target.offset().top, 27// scrollBottom: target.offset().bottom 28// }, 3000); 29// } 30// }); 31 32 $('a[href^="#"]').on('click', function(event) { 33 var target = $($(this).attr('href')); 34 if (target.length) { 35 event.preventDefault(); 36 var offset = 120; // height of your sticky header 37 $('html, body').animate({ 38 scrollTop: target.offset().top - offset 39 }, 600); // adjust speed as needed 40 } 41}); 42 43 $(".faq_title").click(function() { 44 //$(".faq_description").removeClass("open_faq") 45 $(this).next('.faq_description').toggleClass("open_faq"); 46 }); 47 48 /* Homepage Featured Slider */ 49 $('.featured_blog_slider').owlCarousel({ 50 loop:true, 51 margin:0, 52 dots: false, 53 nav: false, 54 autoplay:true, 55 autoplayTimeout:6000, 56 autoplayHoverPause:true, 57 responsive:{ 58 0:{ 59 items:1 60 }, 61 600:{ 62 items:1 63 }, 64 1000:{ 65 items:1 66 } 67 } 68 }) 69 70jQuery(document).ready(function($) { 71 // Define the height of your sticky header 72 const headerHeight = 100; // Adjust this value 73 74 // Select all anchor links that point to an ID on the same page 75 $('a[href^="#"]').on('click', function(e) { 76 const hash = $(this).attr('href'); 77 // Ensure it's an internal link 78 if (hash.length > 1 && $(hash).length) { // Check if hash exists and target element exists 79 e.preventDefault(); // Prevent default jump 80 81 // Calculate the target scroll position 82 const targetScroll = $(hash).offset().top - headerHeight; 83 84 // Smooth scroll to the adjusted position 85 $('html, body').animate({ 86 scrollTop: targetScroll 87 }, 800, function() { 88 // Optional: Add hash to URL after scrolling completes 89 window.location.hash = hash; 90 }); 91 } 92 }); 93}); 94}) 95 96 97function progressBarScroll() { 98 let winScroll = document.body.scrollTop || document.documentElement.scrollTop, 99 height = document.documentElement.scrollHeight - document.documentElement.clientHeight, 100 scrolled = (winScroll / height) * 100; 101 document.getElementById("progressBar").style.width = scrolled + "%"; 102} 103 104window.onscroll = function () { 105 progressBarScroll(); 106}; 107 108 109document.addEventListener("DOMContentLoaded", function() { 110 // Get the elements by their IDs and classes 111 var tocContainer = document.getElementById('ez-toc-container'); 112 var stickyItem = document.querySelector('.sticky-item'); 113 114 // Check if both elements exist 115 if (tocContainer && stickyItem) { 116 // Move the TOC container below the sticky item 117 stickyItem.parentNode.insertBefore(tocContainer, stickyItem.nextSibling); 118 } 119 120if (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream) { 121 document.body.classList.add("ios-device"); 122} 123 }); 124 125function renameChineseGTranslate() { 126 document.querySelectorAll(".gtranslate_wrapper a, .gtranslate_wrapper span, .nturl, .gt_languages a") 127 .forEach(function (el) { 128 129 el.childNodes.forEach(function (node) { 130 if ( 131 node.nodeType === Node.TEXT_NODE && 132 node.nodeValue.includes("Chinese (Simplified)") 133 ) { 134 node.nodeValue = node.nodeValue.replace( 135 "Chinese (Simplified)", 136 "Chinese" 137 ); 138 } 139 }); 140 141 }); 142} 143 144document.addEventListener("DOMContentLoaded", function () { 145 renameChineseGTranslate(); 146 147 setTimeout(renameChineseGTranslate, 500); 148 setTimeout(renameChineseGTranslate, 1500); 149 setTimeout(renameChineseGTranslate, 3000); 150});
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.