Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function($) {
- var kkP = $('#et-info-phone, .kk-phone1, a[href="tel:1300034826"]').toArray(); var lT=[], sT=[], link=[];
- for(i in kkP){lT[i] = $(kkP[i]).text();sT[i] = (lT[i].slice(0,-3)) + "...";link[i]="tel:" + lT[i].replace(/\s/g,'');}
- for (j in kkP){$(kkP[j]).text(sT[j]);} clicked=false;
- for (k in kkP){$(kkP[k]).click(function(){
- if (!clicked){ClickedPhone()}})}
- function ClickedPhone(){for (i in kkP){$(kkP[i]).text(lT[i])}clicked=true;dataLayer.push({'event': 'gtm.phoneclick'})}
- })( jQuery );
Add Comment
Please, Sign In to add comment