Created
May 22, 2016 20:40
-
-
Save Mashpy/e1c0d8c8b42faeb4a80a33878de77e1a to your computer and use it in GitHub Desktop.
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
<head> | |
<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.12.2.min.js"></script> | |
</head> | |
<script> | |
$( document ).ready(function() { | |
$('.telephone').each(function(index){ | |
var tel = $(this).attr('href'); | |
var text_val = 'tel:'+ $(this).text().replace('-', ''); | |
if(text_val != tel){ | |
alert(text_val); | |
} | |
}); | |
$('.email').each(function(index){ | |
var tel = $.trim($(this).attr('href')); | |
var text_val = 'mailto:'+ $.trim($(this).text()); | |
if(text_val != tel){ | |
alert(text_val); | |
} | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment