开发者

jQTouch: How to make phone number link trigger phone app?

I am using jQTouch to create a web app that acts like a native iPhone app. I am trying to duplicate the functionality of the Contacts app. I have created a list view that allows you to tap on a name and see their contact in开发者_开发百科fo.

On a normal web page, phone numbers are turned into links that trigger the Phone app when tapped. I want to do the same thing, but I can't seem to figure out how. iPhone is not doing it automatically.

How can I get my phone numbers to trigger the Phone app when tapped?


You are probably way over this issue 2.5 years down the line, but I had the same problem and found that if I stopPropagation on the element it works. So in your case some Zepto or JQuery:

$('a').tap(function(e) {
     e.stopPropagation();
 })

works for me :)


You want to mark up the number using the 'tel' URL Scheme

eg <a href="tel:1-408-555-5555">1-408-555-5555</a>


You can manually link them, like this:

<a href="tel:+416362610">
   Call me my love you can call me any day or night 
</a>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜