Search code examples
jqueryipadmobile-safariios5

iPad - Make a button more clickable in Safari?


Using an iPad, IOS5, is there anyway to make a button more clickable in the browser? I have a website using html 5 and I noticed that I sometimes have to click a button multiple times for the jquery to read the click event. Here is the html for a button I use:

<button class="button purple">SEARCH</button>

Jquery:

$('.button.purple').click(function() {

//Code goes here

});

Solution

  • If there are multiple click events on that page, you might want to try event.preventDefault();

    $('.button.purple').click(function(e) {
    
        //Code goes here
    
        e.preventDefault();
    });