-
-
Save zearadoua/f387e7a631b5778b7725f91dccfa4b65 to your computer and use it in GitHub Desktop.
prevent call option in non mobile device
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
// 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