Price Range Slider (JS)

document.addEventListener(‘DOMContentLoaded’, function() { const priceRangeSlider = document.getElementById(‘priceRangeSlider’); const priceDisplay = document.getElementById(‘priceDisplay’); const hiddenField = document.querySelector(‘input[name=”input_9″]’); priceRangeSlider.addEventListener(‘input’, function() { const value = this.value; priceDisplay.textContent = value; hiddenField.value = value; }); });Continue reading

samap.js

// Initialize the map function initMap() { const map = L.map(‘map’, { maxBounds: [ // Set the maximum boundaries for the map [40.32732, -92.46601], // Southwest corner coordinates [43.47062, -84.25403] // Northeast corner coordinates ] }).setView([42.78236, -87.12695], 8.5); // Add…Continue reading

Set a specific language for Cloudflare Turnstile.

/** * Set a specific language for Cloudflare Turnstile. * * @link https://wpforms.com/developers/how-to-set-the-language-for-cloudflare-turnstile */ function wpf_add_turnstile_language_script() { if (!wp_script_is(‘wpforms-recaptcha’, ‘enqueued’)) { return; } $language_code = ‘ar-eg’; // where ‘ar-eg’ is for Arabic (Egypt) language ?>Continue reading

Body on Scroll

;(function ($) { $(window).scroll(function() { var scroll = $(window).scrollTop(); if (scroll >= 5) { $(“body”).addClass(“scroll-500”); $(“.tm-header”).removeClass(“uk-blend-difference”); } else { $(“body”).removeClass(“scroll-500”); $(“.tm-header”).addClass(“uk-blend-difference”); } }); })(jQuery);Continue reading

Webhook smart tags

{ “smart_tags”: { “region”: “Gujarat”, “state”: “Gujarat”, “province”: “Gujarat”, “territory”: “Gujarat”, “region_code”: “GJ”, “country”: “India”, “country_code”: “IN”, “city”: “Vadodara”, “latitude”: 22.3008, “longitude”: 73.2043, “zip”: “390004”, “postal_code”: “390004”, “day”: “Friday”, “month”: “May”, “year”: “2024”, “date”: “May 31, 2024”, “page_url”: “https://giztale.com/”, “referer_url”:…Continue reading

“Lazy Load Images”.( For Dom Size)

document.addEventListener(“DOMContentLoaded”, function() { const lazyLoadImages = () => { const images = document.querySelectorAll(‘img.lazy’); const observer = new IntersectionObserver((entries, observer) => { entries.forEach(entry => { if (entry.isIntersecting) { const img = entry.target; img.src = img.dataset.src; img.classList.remove(‘lazy’); observer.unobserve(img); } }); }); images.forEach(img…Continue reading

“Lazy Load Images”.

document.addEventListener(“DOMContentLoaded”, function() { const lazyLoadImages = () => { const images = document.querySelectorAll(‘img.lazy’); const observer = new IntersectionObserver((entries, observer) => { entries.forEach(entry => { if (entry.isIntersecting) { const img = entry.target; img.src = img.dataset.src; img.classList.remove(‘lazy’); observer.unobserve(img); } }); }); images.forEach(img…Continue reading

Gravity Forms JavaScript Helpers

function icInitializeGravityForms() { // CONSTANTS ——————————————————- const POST_CODE_JP_KEY = ‘BJ7qtSrq0iYgWj9AV0P4esvTTX1gmq48813DoE1’; const TO_SINGLE_MAP = { numeral: { ‘0’ : ‘0’, ‘1’ : ‘1’, ‘2’ : ‘2’, ‘3’ : ‘3’, ‘4’ : ‘4’, ‘5’ : ‘5’, ‘6’ : ‘6’, ‘7’ : ‘7’,…Continue reading

HashBars and Responsive Menu Pro Adjustment

jQuery(document).ready(function($) { if($(‘.hthb-notification’).length){ var wpadminBar = 0; if($( “#wpadminbar” ).length){ wpadminBar = $( “#wpadminbar” ).height(); } setTimeout(() => { var hthbNotification = $( “.hthb-notification:visible” ).height(); $(‘body’).css(‘margin-top’,hthbNotification + ‘px’);hthbNotification $(‘#responsive-menu-pro-button’).css(‘margin-top’,hthbNotification + wpadminBar + 20 + ‘px’); $(window).resize(function(){ var hthbNotification = $(…Continue reading

FB Events App.js

window.fbAsyncInit = function() { FB.init({ appId : ‘247399214359492’, cookie : true, xfbml : true, version : ‘v16.0’ }); FB.AppEvents.logPageView(); }; (function(d, s, id){ var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) {return;} js = d.createElement(s); js.id = id; js.src = “https://connect.facebook.net/en_US/sdk.js”;…Continue reading