OnClick Events Conversion for iOS

function iosClicks() {
    var iOS = !!navigator.userAgent.match('iPhone OS') || !!navigator.userAgent.match('iPad');
    if (iOS) {
        $('[onclick]').each(function() {
        var onclick = $(this).attr('onclick');
        $(this).removeAttr('onclick'); // Remove the onclick attribute
        $(this).bind("click", function(e) {
            e.preventDefault;
            }); // prevent the click default action
        $(this).bind('tap', onclick); // Turn taps into click
        });
    }
}