How to disable the default behavior of an Anchor in jQuery Mobile (iOS)

后端 未结 5 1333
悲哀的现实
悲哀的现实 2020-12-05 08:26

I am building an app for iPhone and iPad using PhoneGap and jQM


      
5条回答
  •  既然无缘
    2020-12-05 09:14

    When you do $('a').click( .. ) you're only processing the 'click' event. Here it's a different event and actually a system event for iOS that you cannot handle in javascript.

    So you'll have to disable this feature completely from your webapp if you don't want it.

    Try the following:

    
    

    Or in your CSS:

    a[data-role=button] {
        -webkit-user-select: none!important;
    }
    

提交回复
热议问题