I can't get mailto links to open the Mail app from Mobile Safari when using jQTouch. What could be wrong?

前端 未结 5 1165
故里飘歌
故里飘歌 2020-12-16 18:00

I\'m developing an iPhone web app using jQTouch, and it contains a simple mailto: link to a valid email address, which should launch the iPhone mail application

5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-16 18:40

    It works fine just with target="_blank".

    For those (like me) who find it annoying to get the "This will open in a new page" popup every time you tap on a mailto or tel link you can do this:

    Edit jqtouch.js and go to line 284:

    if ($el.attr('target') == '_blank' || $el.attr('rel') == 'external')
    

    Now replace this line by:

    if ($el.attr('target') == '_self' || $el.attr('target') == '_blank' || $el.attr('rel') == 'external')
    

    And on the HTML (e.g.):

    Call me
    

    becomes

    Call me
    

提交回复
热议问题