Skip to content

Instantly share code, notes, and snippets.

@thegallagher
Created April 11, 2016 12:00
Show Gist options
  • Save thegallagher/7e8dc873d6114250baa1450cc4d02d9e to your computer and use it in GitHub Desktop.
Save thegallagher/7e8dc873d6114250baa1450cc4d02d9e to your computer and use it in GitHub Desktop.
Detecting tel link support
<script>
jQuery(function($) {
var iframe = $('<iframe></iframe>');
iframe.attr('name', 'tellink');
iframe.css('display', 'none');
iframe.appendTo('body');
$('a[href^="tel:"]').attr('target', 'tellink');
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment