Skip to content

Instantly share code, notes, and snippets.

@zearadoua

zearadoua/js

Created Oct 18, 2017
Embed
What would you like to do?
prevent call option in non mobile device
// desactivate call option in non mobile device
$(document).on('click', '[href^="tel:"]', function(e){
if( !/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
e.preventDefault();
e.stopPropagation();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment