1function debounce(fn, delay) { 2 $(".yt-videos-section .img-container a p").remove(); 3 var timer = null; 4 return function () { 5 var context = this, 6 args = arguments; 7 clearTimeout(timer); 8 timer = setTimeout(function () { 9 fn.apply(context, args); 10 }, delay); 11 }; 12} 13 14var navOffsetTop = 66; 15$(function () { 16 17 18 $('[data-toggle="tooltip"]').tooltip({ 19 trigger: "hover", 20 }); 21 22 let upArrow = "<div class='menuArrowContainer'><div class='menuArrow' style='color:white; transform: scaleX(2)'>â²</div></div>" 23 24 $('.nav-link.dropdown-toggle').on('shown.bs.dropdown', (e) => { 25 let thisElement = $(e.target) 26 let thisElementWidth = thisElement.outerWidth() 27 28 $('.menuArrowContainer').remove() 29 $(thisElement).append(upArrow) 30 $('.menuArrowContainer').css({ 'right': `${thisElementWidth / 2 - 23}px` }) 31 setTimeout(() => { 32 $('.menuArrowContainer').css({ 'bottom': window.innerWidth > 992 ? 0 : -7 }) 33 }, 1) 34 setTimeout(() => { 35 $('.menuArrow').css({'text-shadow': '0 0 10px rgba(0, 0, 0, 0.5)'}) 36 },100) 37 }) 38 39 $(document).on('hidden.bs.dropdown', (e) => { 40 if (!$(".dropdown-toggle").hasClass('show')) { 41 $('.menuArrowContainer').remove() 42 } 43 }) 44 45 $(".nav-item").mouseup(function () { 46 if ($(this).find(".dropdown-menu").hasClass("show")) { 47 $(this).find(".nav-link").blur(); 48 } 49 }); 50 let startEachMessage = true; 51 let startSubscribeButton = true; 52 let bannerBadges = true; 53 54 let showElementWithAnimation = () => { 55 if (window.innerWidth > 992) { 56 if (window.scrollY > navOffsetTop + 2) { 57 $("#navbar_top").addClass("fixed-top"); 58 59 $(".hero").css("margin-top", 95); 60 if (window.innerWidth > 1135) { 61 $(".navbar-brand img").css({ width: "75px", top: "9px" }); 62 } 63 $("#navbar_top h1").css({ "font-size": "2rem" }); 64 $("#site-title").css({ "line-height": "17px" }); 65 } else { 66 $("#navbar_top").removeClass("fixed-top"); 67 68 $(".navbar-brand img").width(192); 69 $("#navbar_top h1, #site-title, .hero").removeAttr( 70 "style" 71 ); 72 } 73 if (bannerBadges) { 74 $(".CCC-award-banners").each(function (i) { 75 var bottom_of_object = $(this).offset().top + $(this).outerHeight(); 76 var bottom_of_window = $(window).scrollTop() + $(window).height(); 77 console.log("enter banerBadges", bottom_of_window, bottom_of_object); 78 if (bottom_of_window >= bottom_of_object - 2000) { 79 bannerBadges = false; 80 setTimeout(() => { 81 $(this).css({ opacity: 1, transform: "translateY(0px)" }); 82 }, i * 200); 83 } 84 }); 85 } 86 if ($('.fraud-alert').css('opacity') === '0') { 87 $(".services .icon-container").each(function (i) { 88 var bottom_of_object = $(this).offset().top + $(this).outerHeight(); 89 var bottom_of_window = $(window).scrollTop() + $(window).height(); 90 if (bottom_of_window >= bottom_of_object - 70) { 91 92 setTimeout(() => { 93 $(this).css({ opacity: 1, transform: "translateY(0px)" }); 94 }, i * 80); 95 } 96 }); 97 } 98 if (startEachMessage) { 99 $(".our-mission-box").each(function (i) { 100 var bottom_of_object = $(this).offset().top + $(this).outerHeight(); 101 var bottom_of_window = $(window).scrollTop() + $(window).height(); 102 if (bottom_of_window >= bottom_of_object - 70) { 103 setTimeout(() => { 104 startEachMessage = false; 105 $(this).css({ opacity: 1, transform: "translateY(0px)" }); 106 }, i * 80); 107 } 108 }); 109 } 110 if (startSubscribeButton) { 111 var bottom_of_object = $("#subscribeButtonContainer").offset().top + $("#subscribeButtonContainer").outerHeight(); 112 var bottom_of_window = $(window).scrollTop() + $(window).height(); 113 if (bottom_of_window >= bottom_of_object + 170) { 114 startEachMessage = false; 115 $("#subscribeButtonContainer").css({ opacity: 1, transform: "scale(1)" }); 116 } 117 } 118 } 119 } 120 window.onload = showElementWithAnimation() 121 122 $(window).on("scroll", function () { 123 showElementWithAnimation() 124 }); 125 126 let slideSwitch = (labelName) => { 127 switch (labelName) { 128 case "Slide 1": 129 return { 130 url: "../../img/slideshow-pictures/SliderWalkWay.webp", 131 }; 132 case "Slide 2": 133 return { 134 url: "../../img/slideshow-pictures/SliderJusticeCenter.webp", 135 }; 136 case "Slide 3": 137 return { 138 url: "../../img/slideshow-pictures/MurdockAdminBldg.webp", 139 }; 140 case "Slide 4": 141 return { 142 url: "../../img/slideshow-pictures/WestCounty.jpg", 143 }; 144 case "Slide 5": 145 return { 146 url: "../../img/slideshow-pictures/SliderBoardRoom.jpg", 147 }; 148 //case "Slide 6": 149 // return { 150 // url: "../../img/slideshow-pictures/Slider6.png", 151 // }; 152 } 153 }; 154 155 $("button[aria-label*='Slide']").each((index) => { 156 let labelName = `Slide ${index + 1}`; 157 let element = $(`button[aria-label*='${labelName}']`); 158 element.css("background-image", `url(${slideSwitch(labelName).url}`); 159 }); 160 161 $(document).on("click touchstart", "a[href='#PDFModal']", (e) => { 162 $("#PDFModal .modal-title").remove(); 163 $("#PDFModal embed").attr("src", $(e.target).data("link")); 164 });
165 $.ajax({ 166 url: "../../messages/opening-message.html", 167 success: function (html) { 168 if ($(html).find("#OpeningMessageBody").prevObject[2]) { 169 let title = $(html).find("#OpeningMessageTitle"); 170 let body = $(html).find("#OpeningMessageBody"); 171 $("#CharlotteClerkImportantMessageModalTitle").append( 172 title.prevObject[0].innerHTML 173 ); 174 $("#CharlotteClerkImportantMessageModal #important-message").append( 175 body.prevObject[2].innerHTML 176 ); 177 $("#CharlotteClerkImportantMessageModal").modal("show"); 178 } 179 }, 180 }); 181 $("#CharlotteClerkYTVideoModal").on("hidden.bs.modal", function () { 182 $(this).find("iframe").attr("src", ""); 183 $(this).find(".modal-title").empty("h5"); 184 }); 185 186 $(".CharlotteClerkVideos > img:first-child").remove(); 187 188 $(document).on("click", '.CharlotteClerkVideos', function () { 189 $("#CharlotteClerkYTVideoModalTitle").append($(this).data("title")); 190 $("#CharlotteClerkYTVideoModal") 191 .find("iframe") 192 .attr("src", $(this).data("src")); 193 $("#CharlotteClerkYTVideoModal .modal-title").remove(); 194 }); 195 196 var textWrapper = document.querySelectorAll(".ml12"); 197 var activeElement; 198 textWrapper.forEach((element) => { 199 if (window.getComputedStyle(element).display === 'block') { 200 activeElement = element 201 } 202 }) 203 activeElement.innerHTML = activeElement.textContent.replace( 204 /\S/g, 205 "<span class='letter'>$&</span>" 206 ); 207 208 anime.timeline({ loop: false }).add({ 209 targets: ".ml12 .letter", 210 translateX: [40, 0], 211 translateZ: 0, 212 opacity: [0, 1], 213 easing: "easeOutExpo", 214 duration: 500, 215 delay: (el, i) => 500 + 20 * i, 216 }); 217 218 $(".facebook").on("click", function () { 219 window.open("https://www.facebook.com/CharlotteCountyClerk", "_blank"); 220 }); 221 $(".instagram").on("click", function () { 222 window.open( 223 "https://www.instagram.com/charlottecountyclerk/?igshid=d36wrasdrsq", 224 "_blank" 225 ); 226 }); 227 $(".twitter").on("click", function () { 228 window.open("https://twitter.com/CharCoClerk", "_blank"); 229 }); 230 $(".youtube").on("click", function () { 231 window.open( 232 "https://www.youtube.com/channel/UC4YQpe3Q85Rg5lJ2Y7U4_yA", 233 "_blank" 234 ); 235 }); 236 $(".linkedin").on("click", function () { 237 window.open( 238 "https://www.linkedin.com/company/charlotte-county-clerk-of-the-circuit-court-county-comptroller/?viewAsMember=true", 239 "_blank" 240 ); 241 }); 242 243 244 245 $("button.accessibility-icon").click(() => { 246 $(".modal-backdrop").remove(); 247 $("body").css({ "overflow-y": "scroll", "padding-right": 0 }); 248 }); 249 250 // search input results box 251 252 googleTranslateElementInit(); 253 254 const triggerEvent = (element, eventName) => { 255 const event = new Event(eventName); 256 element.dispatchEvent(event); 257 }; 258 259 $("#LanguageToggle").click((e) => { 260 if (e.target.innerHTML.replace(/\s/g, "") === "Español") { 261 $(e.target).empty().append("English"); 262 $(".goog-te-combo").val("es"); 263 } else if (e.target.innerHTML.replace(/\s/g, "") === "English") { 264 $(e.target).empty().append("Español"); 265 $("#:1.restore").trigger("click"); 266 } 267 triggerEvent(document.querySelector(".goog-te-combo"), "change"); 268 }); 269}); 270 271function googleTranslateElementInit() { 272 new google.translate.TranslateElement( 273 { pageLanguage: "en" }, 274 "google_translate_element" 275 ); 276} 277 278function changeLanguageText() { 279 if ($(".goog-te-combo option:first-child").text() == "Select Language") { 280 $(".goog-te-combo option:first-child").html("Translate"); 281 $(".translatebox").fadeTo("slow", "1"); 282 } else { 283 setTimeout(changeLanguageText, 1); 284 } 285} 286 287$(window).on("resize load", () => { 288 $(".accordion-body").css("height", $(".hero").height() * 0.7415); 289}); 290 291const findCaptionContainerHeight = () => $('.carousel-item.active .carousel-caption').height() 292const findCaptionTextHeight = () => $('.carousel-item.active .carousel-caption p').height() + $('.carousel-item.active .carousel-caption h3').height() + 20 293 294const readMoreButton = '<a class="btn btn-primary caption-read-more">Read more</a>' 295 296const analyzeCaptionDimensions = () => { 297 if (findCaptionTextHeight() > findCaptionContainerHeight()) { 298 $('.carousel-caption').append(readMoreButton) 299 setTimeout(() => { 300 $('.caption-read-more').css({ opacity: 1 }) 301 },1) 302 303 } else { 304 $('.caption-read-more').remove() 305 } 306} 307analyzeCaptionDimensions() 308 309$('#ccc-carousel').on('slide.bs.carousel', (e) => { 310 $('.caption-read-more').remove() 311 $('.carousel-caption').css({ minHeight: 200 }) 312 $('.caption-read-more').text('Read more') 313}) 314$('#ccc-carousel').on('slid.bs.carousel', (e) => { 315 analyzeCaptionDimensions() 316 if (findCaptionTextHeight() > findCaptionContainerHeight()) { 317 $('.carousel-caption').append(readMoreButton) 318 setTimeout(() => { 319 $('.caption-read-more').css({ opacity: 1 }) 320 }, 100) 321 } else { 322 $('.caption-read-more').remove() 323 } 324}) 325 326$(document).on('click', '.caption-read-more', () => { 327 if ($('.carousel-caption').css('minHeight') === '200px') { 328 $('.carousel-caption').css({ minHeight: (findCaptionTextHeight() - findCaptionContainerHeight()) + 200 + 50 }) 329 $('.caption-read-more').text('Read less') 330 } else { 331 $('.carousel-caption').css({ minHeight: 200 }) 332 $('.caption-read-more').text('Read more') 333 } 334}) 335 336$('#navbarCollapse').on('show.bs.collapse', function () { 337 $('#nav-icon2').toggleClass("open") 338}) 339 340$('#navbarCollapse').on('hide.bs.collapse', function () { 341 $('#nav-icon2').toggleClass("open") 342}) 343
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.