Last active
June 21, 2016 11:50
-
-
Save madcatgith/bb1048cbdf9b37afece1cd2220940341 to your computer and use it in GitHub Desktop.
js for phone hiding under spoiler
This file contains 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
//Show phone number | |
/* | |
class=".phone_show"; | |
data-last="$value" | |
*/ | |
$(document).ready(function(){ | |
if ($.cookie('phone_show')){ | |
$('.phone_show').each(function(i,elem){ | |
$(this).text($(this).data('last')); | |
$(this).removeClass(); | |
}); | |
} | |
}); | |
$('.phone_show').on('click',function(){ | |
$.cookie('phone_show','true'); | |
ga('send','event','button','click','phone'); | |
$('.phone_show').each(function(i,elem){ | |
$(this).text($(this).data('last')); | |
$(this).removeClass(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment