This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//list of RegExp | |
/* Pattern for Matching Search Filter */ | |
var pattern1 = /^[\w\s\-]*$/; | |
var pattern2 = /^[\a-Z\w\’£\s]*$/; | |
var pattern3 = /^[\a-Z\w\'’£\s]*$/; /* Uncaught range change to */ /^[\a-zA\w\-\’£®™\s]*$/ | |
var pattern4 = /^[\a-Z\w\’£®™\s]*$/; | |
var pattern5 = /^[\w\-\.+,;:='’£%™®\s]*$/; //Used and best approach for custom alphanumerical |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//in page search filter with callback if no result found// | |
jQuery(document).ready(function($){ | |
var $search = $("#inpsearch-bar").on('input',function(){ | |
var matcher = new RegExp($(this).val(), 'gi'); | |
$('.filter-box').show().not(function(){ | |
return matcher.test($(this).find('.name').text()) | |
}).hide(); | |
if($('.filter-box:visible').length===0){ | |
$('.noresult').show(); | |
} else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let msg = new SpeechSynthesisUtterance(); | |
let voices = speechSynthesis.getVoices(); | |
msg.voice = voices[0]; | |
let tags = document.querySelectorAll('p,a,h1,h2,h3'); // add more tags for you project | |
tags.forEach((tag) => { | |
tag.addEventListener('click', (e) => { | |
msg.text = e.target.innerText; | |
tag.style.backgroundColor = "yellow"; | |
speechSynthesis.speak(msg); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
selector .box-container:hover .box-img:after{ | |
content: "COMING SOON"; | |
opacity: 1; | |
font-size: 24px; | |
color: var(--e-global-color-710bfa0); | |
text-shadow: 0px 1px 0px 0px rgba(0.0.0.0,5); | |
letter-spacing: 1,5em; | |
position: absolute; | |
font-weight: bold; | |
top: 50%; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(document).ready(function($) { | |
$("#myInput").on("keyup", function() { | |
var value = $(this).val().toLowerCase(); | |
//Select all article and show | |
$("article > div").show().filter(function() { | |
//Find h3 and p also check if the value is substring of the text. Return true if not found. | |
return $(this).find('h3,p').text().toLowerCase().indexOf(value) === -1; | |
}).hide(); | |
//Hide all h3 and p that that the value is not the substring of text | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const headerSticky = document.querySelector('#stickyheaders'); | |
const headerUP = document.querySelector('.headerup'); | |
const styles = { | |
sticky: { | |
transition : 'transform 0.34s ease' | |
}, | |
up: { | |
transform: 'translateY(-80px)' | |
}, | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( function() { | |
var the_timer = setInterval( function() { | |
if( typeof Swiper && typeof jQuery ) { | |
runTheCode(); | |
clearInterval( the_timer ); | |
} | |
}, 100 ); | |
} )(); | |
function runTheCode() { | |
// add 'swiper-container' class to .elementor-container |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var $ = jQuery; | |
$(document).ready(function(){ | |
//default | |
$('.text-details').hide(); | |
$('.text-details.active').show(); | |
//after click | |
$(".tabmenu").on("click", function(){ | |
var dataId = $(this).attr("data-tab"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
var testim = document.getElementById("testim"), | |
testimDots = Array.prototype.slice.call(document.getElementById("testim-dots").children), | |
testimContent = Array.prototype.slice.call(document.getElementById("testim-content").children), | |
testimLeftArrow = document.getElementById("left-arrow"), | |
testimRightArrow = document.getElementById("right-arrow"), | |
testimSpeed = 9000, | |
currentSlide = 0, | |
currentActive = 0, | |
testimTimer, |
NewerOlder