Type: js
Highlight Button on Scroll for Active Section on Vendor Pages
document.addEventListener(“DOMContentLoaded”, function() { var galleryButton = document.querySelector(“.elementor-81101 .elementor-element.elementor-element-fadf404 .elementor-button”); var realWeddingsButton = document.querySelector(“.elementor-81101 .elementor-element.elementor-element-5de19ff .elementor-button”); var faqButton = document.querySelector(“.elementor-81101 .elementor-element.elementor-element-4cc0a6c .elementor-button”); var aboutButton = document.querySelector(“.elementor-81101 .elementor-element.elementor-element-354b71e.elementor-element”); var locationsButton = document.querySelector(“.elementor-81101 .elementor-element.elementor-element-9840650.elementor-element”); var specialtyButton = document.querySelector(“.elementor-81101 .elementor-element.elementor-element-dabc0f3.elementor-element”); var stickyMenu = document.querySelector(“.elementor-81101…Continue reading
JS [Elementor Templates > Vendor & Vendor Taxonomy Archives]: Show Search Facet on Search Icon Click
// document.addEventListener(‘DOMContentLoaded’, function() { var searchFacet = document.getElementById(‘search-facet’); var showSearchFacetBtn = document.getElementById(‘show-search-facet’); if (searchFacet) { searchFacet.style.display = ‘none’; } showSearchFacetBtn.addEventListener(‘click’, function() { if (searchFacet.style.display === ‘none’) { searchFacet.style.display = ‘block’; } else { searchFacet.style.display = ‘none’; } }); });Continue reading
Vendor (JS): Hide Empty Fields & Add Link Attributes on Vendor Post Pages
// Hide empty phone, specialty, social media, real wedding and FAQ elements document.addEventListener(‘DOMContentLoaded’, function() { var phoneField = document.getElementById(‘phone-field’); var phoneContainer = document.getElementById(‘phone-container’); var specialtyValue = document.getElementById(‘specialty-value’); var specialtySection = document.getElementById(‘specialty-section’); var specialtyButton = document.getElementById(‘specialty-button’); var socialIcons = document.querySelectorAll(‘.elementor-social-icon’); var…Continue reading
Hide Empty Fields & Add Link Attributes on Vendor Post Pages
// Hide empty phone, specialty, social media, real wedding and FAQ elements document.addEventListener(‘DOMContentLoaded’, function() { var phoneField = document.getElementById(‘phone-field’); var phoneContainer = document.getElementById(‘phone-container’); var specialtyValue = document.getElementById(‘specialty-value’); var specialtySection = document.getElementById(‘specialty-section’); var specialtyButton = document.getElementById(‘specialty-button’); var socialIcons = document.querySelectorAll(‘.elementor-social-icon’); var…Continue reading
Hide Empty Fields & Add Link Attributes on Vendor Post Pages
// Hide empty phone, specialty, social media, real wedding and FAQ elements document.addEventListener(‘DOMContentLoaded’, function() { var phoneField = document.getElementById(‘phone-field’); var phoneContainer = document.getElementById(‘phone-container’); var specialtyValue = document.getElementById(‘specialty-value’); var specialtySection = document.getElementById(‘specialty-section’); var specialtyButton = document.getElementById(‘specialty-button’); var socialIcons = document.querySelectorAll(‘.elementor-social-icon’); var…Continue reading
Change Class Forum Category Title Via DOM (reference)
document.querySelector(‘#forums-list-313 > li.bbp-header > ul > li.bbp-forum-info’).innerHTML = ‘Forum’;Continue reading
UIKit Preloader JS
;(function ($) { $(document).on(‘ready’, function(){ if($(‘#global-preloader’)) return $(‘#global-preloader’).fadeOut(500); }); })(jQuery);Continue reading
openPopUp JS
var t=setTimeout(openPopUp,5000); function openPopUp(url) { if(document.getElementById(“modal-join-our-mailing-list-button”)) document.getElementById(“modal-join-our-mailing-list-button”).click(); }Continue reading
Form Submit Preloader JS
var forms = document.querySelector(‘[method=”post”]’); if(forms) forms.addEventListener(“submit”, function(e){ if(document.getElementById(‘global-preloader’)){ document.getElementById(‘global-preloader’).style.display = ‘block’; var t=setTimeout(openPopUpX,1500); function openPopUpX(url) { document.getElementById(‘global-preloader’).style.display = ‘none’; } } return; });Continue reading