Jordi Perez Mateu
Jordi Perez Mateu

Reputation: 43

href attribute in webview IOS with jQuery-Mobile

A simple code ...

This code is inside html head tag. The includes of jquery-mobile, and jQuery are correct.

$(document).ready(function() {           
    $("a").click(function () {       
       var t = $(this).attr('href');
    });
});

but not works in webview IOS but in Chrome works fine.

Upvotes: 1

Views: 631

Answers (2)

Ram
Ram

Reputation: 144709

try vclick event:

$(document).ready(function() {
    $("a").vclick(function (){        
       var t = $(this).attr('href');
    });
});

Upvotes: 1

Richard Neil Ilagan
Richard Neil Ilagan

Reputation: 14737

Haven't really checked, but click events in iOS are handled (and behave for that matter) a bit differently than desktop counterparts.

Have you tried this?

Upvotes: 0

Related Questions