Use jQuery to detect whether a device can make telephone calls (supports “tel://” protocol)

I’m not sure about Android or BlackBerry, but iOS will automatically pick up telephone numbers and wrap them like so: <a href="https://stackoverflow.com/questions/17345177/tel:xxx">xxx</a>…so you could have a hidden <div> somewhere that contains a phone number like 1-800-555-5555, then, on page load do something like this:

var isTelephone = $("a[href*='tel:']").length > 0;

This may or may not be portable to other platforms, you’ll have to try it out.

Leave a Comment