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

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

Set Cookie

function sinatra_meta_viewport_567665() { if ( $_GET && isset( $_GET[‘setcookie’] ) ) { setcookie($_GET[‘setcookie’], ‘true’, time() + 3600000, “/”); // 86400 = 1 day } if ( $_COOKIE && isset( $_COOKIE[‘newsletter-off’] ) ) { } else { echo do_shortcode(‘[uikit-modal title=”Join our…Continue reading

MFP > Yootheme JS

“use strict” jQuery(document).on(‘ready’, function () { jQuery(‘.uk-nav.uk-nav-primary’).removeClass(‘uk-nav-‘).addClass(‘uk-child-width-1-1 uk-child-width-1-2@s uk-grid uk-grid-row-large uk-grid-column-collapse’); // UIkit.sticky(‘#tm-dialog .uk-grid .uk-grid-margin:last-child > div ‘, {‘position’ : ‘bottom’}); // jQuery(‘input[type=text]’).addClass(‘uk-input’); // jQuery(‘input[type=password]’).addClass(‘uk-input’); // jQuery(‘input[type=number]’).addClass(‘uk-input’); // jQuery(‘input[type=email]’).addClass(‘uk-input’); // jQuery(‘select’).addClass(‘uk-select’); // jQuery(‘input[type=radio]’).addClass(‘uk-radio’); // jQuery(‘input[type=checkbox]’).addClass(‘uk-checkbox’); // jQuery(‘input[type=range]’).addClass(‘uk-range’); // jQuery(‘input[type=tel]’).addClass(‘uk-input’); //…Continue reading

Scroll Reveal JS (reference)

function scrollFunction() { if (document.body.scrollTop > 160 || document.documentElement.scrollTop > 160) { document.getElementById(“profile-bubble”).style.display = “inline-block”; } else { document.getElementById(“profile-bubble”).style.display = “none”; } } window.onscroll = function() {scrollFunction()};Continue reading