1// -------------------------------------------------------------- 2// -------------------------------------------------------------- 3// 4// 5// *** Remove Vertical Pipe on Member *** 6// 7// 8// -------------------------------------------------------------- 9// -------------------------------------------------------------- 10 11// jQuery(document).ready(function ($) { 12// var $originalElement = $("body.logged-in .mega-menu-item-202926"); 13// var $newElement = $originalElement.clone(); 14// $newElement.attr("id", "mega-menu-item-202926-1"); 15// $newElement.find("a").eq(0).remove(); 16// $originalElement.find("a").eq(1).remove(); 17// $newElement 18// .removeClass() 19// .addClass( 20// "mega-member-login mega-menu-item mega-menu-item-202926-1 member-logout" 21// ); 22// $originalElement 23// .removeClass() 24// .addClass( 25// "mega-member-login mega-menu-item menu-rule-right mega-menu-item-202926 member-login" 26// ); 27// $newElement.insertAfter($originalElement); 28 29// $("li.member-login > a.mega-menu-link").each(function () { 30// var text = $(this).text(); 31// $(this).text(text.replace("|", "")); 32// }); 33// }); 34 35/// -------------------------------------------------------------- 36/// -------------------------------------------------------------- 37/// 38/// 39/// *** Accordions *** 40/// 41/// 42/// -------------------------------------------------------------- 43/// -------------------------------------------------------------- 44 45jQuery(document).ready(function ($) { 46 $(".et_pb_accordion .et_pb_toggle").addClass("accordion_toggle"); 47 $(".et_pb_accordion .et_pb_toggle_open") 48 .addClass("et_pb_toggle_close") 49 .removeClass("et_pb_toggle_open"); 50 $(".et_pb_accordion .et_pb_toggle_title").click(function () { 51 var $toggle = $(this).closest(".et_pb_toggle"); 52 var $content = $toggle.find(".et_pb_toggle_content"); 53 54 if ($toggle.hasClass("et_pb_toggle_close")) { 55 $content.slideDown(700); 56 $(".et_pb_toggle_content").not($content).slideUp(700); 57 $(".et_pb_toggle") 58 .not($toggle) 59 .removeClass("et_pb_toggle_open") 60 .addClass("et_pb_toggle_close"); 61 $toggle.removeClass("et_pb_toggle_close").addClass("et_pb_toggle_open"); 62 } else if ($toggle.hasClass("et_pb_toggle_open")) { 63 $content.slideUp(700); 64 $toggle.removeClass("et_pb_toggle_open").addClass("et_pb_toggle_close"); 65 } 66 }); 67}); 68 69/// -------------------------------------------------------------- 70/// -------------------------------------------------------------- 71/// 72/// 73/// *** Read More *** 74/// 75/// 76/// -------------------------------------------------------------- 77/// -------------------------------------------------------------- 78 79jQuery(document).ready(function ($) { 80 $(".et_pb_toggle:not(.accordion_toggle) .et_pb_toggle_title").click( 81 function () { 82 var $toggle = $(this).closest(".et_pb_toggle"); 83 var $content = $toggle.find(".et_pb_toggle_content"); 84 85 if ($toggle.hasClass("et_pb_toggle_close")) { 86 $content.slideDown(700); 87 $(".et_pb_toggle_content").not($content).slideUp(700); 88 $(".et_pb_toggle") 89 .not($toggle) 90 .removeClass("et_pb_toggle_open") 91 .addClass("et_pb_toggle_close"); 92 $toggle.removeClass("et_pb_toggle_close").addClass("et_pb_toggle_open"); 93 } else if ($toggle.hasClass("et_pb_toggle_open")) { 94 $content.slideUp(700); 95 $toggle.removeClass("et_pb_toggle_open").addClass("et_pb_toggle_close"); 96 } 97 } 98 ); 99}); 100 101// -------------------------------------------------------------- 102// -------------------------------------------------------------- 103// 104// 105// *** Smooth Scroll *** 106// 107// 108// -------------------------------------------------------------- 109// -------------------------------------------------------------- 110jQuery(function ($) { 111 window.et_pb_smooth_scroll = function ($target, $top_section, speed, easing) { 112 113 var $window_width = $(window).width(); 114 115 $menu_offset = -1; 116 117 var headerHeight = 143; 118 119 if ($('#wpadminbar').length && $window_width <= 980) { 120 $menu_offset += $('#wpadminbar').outerHeight() + headerHeight; 121 } 122 else { 123 $menu_offset += headerHeight; 124 } 125 126 //fix sidenav scroll to top 127 if ($top_section) { 128 $scroll_position = 0; 129 } 130 else { 131 $scroll_position = $target.offset().top - $menu_offset; 132 } 133 134 // set swing (animate's scrollTop default) as default value 135 if (typeof easing === 'undefined') { 136 easing = 'swing'; 137 } 138 139 $('html, body').animate({ scrollTop: $scroll_position }, speed, easing); 140 141 } 142}); 143 144// -------------------------------------------------------------- 145// -------------------------------------------------------------- 146// 147// 148// *** Scroll to Top *** 149// 150// 151// -------------------------------------------------------------- 152// -------------------------------------------------------------- 153 154// Moved to assets/scripts/back-to-top.js. 155 156// jQuery(document).ready(function ($) { 157// // Function to update the top position of .explore-coatings--sticky 158// function updateStickyTop() { 159// var headerHeight = $('#header-top').outerHeight(); 160// if ($('body').hasClass('logged-in admin-bar') && $(window).width() > 616) { 161// headerHeight += 32; 162// } 163// $('.explore-coatings--sticky').css('top', headerHeight + 'px'); 164 165// // Check if explore-coatings--sticky is headerHeight offset from the top of the page 166// var scrollTop = $(window).scrollTop(); 167// var stickyTop = $('.explore-coatings--sticky').offset().top; 168// if (scrollTop >= stickyTop - headerHeight) { 169// // explore-coatings--sticky is headerHeight offset from the top of the page 170// $('.explore-coatings--sticky').addClass('sticky-shadow'); 171// } else { 172// // explore-coatings--sticky is not headerHeight offset from the top of the page 173// $('.explore-coatings--sticky').removeClass('sticky-shadow'); 174// } 175// } 176 177// // Apply only to page with body class page-id-245811 178// if ($('body').hasClass('page-id-245811')) { 179// // Initial update 180// updateStickyTop(); 181 182// // Update on window resize 183// $(window).on('load resize scroll', function () { 184// updateStickyTop(); 185// }); 186// } 187// }); 188 189jQuery(document).ready(function ($) { 190 if (!$.fn.fancybox || !$('[data-fancybox]').length) { 191 return; 192 } 193 194 $('[data-fancybox]').fancybox({ 195 animationEffect: "fade", 196 buttons: ["close"] 197 }); 198}); 199 200jQuery(document).ready(function ($) { 201 var $selects = $('select').not('.tribe-bar-views-select').not('.aca-theme'); 202 203 if (!$.fn.select2 || !$selects.length) { 204 return; 205 } 206 207 $selects.select2({ 208 width: '100%' // need to override the changed default 209 }); 210}); 211 212jQuery(document).ready(function ($) { 213 $(".drawer-content.new-tab a").attr("target", "_blank"); 214}); 215 216//// Print Styles ///////////////////////////////////////////// 217jQuery(document).ready(function ($) { 218 function printData() { 219 var divToPrint = document.getElementById("printDiv"); 220 newWin = window.open(""); 221 newWin.document.write(divToPrint.outerHTML); 222 newWin.print(); 223 newWin.close(); 224 } 225 226 $('#doPrint').on('click', function () { 227 printData(); 228 }) 229});
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.