Suppressing default anchor behavior in Safari with jQuery

Posted by Macy Abbey on Stack Overflow See other posts from Stack Overflow or by Macy Abbey
Published on 2010-03-08T16:19:11Z Indexed on 2010/03/08 16:21 UTC
Read the original article Hit count: 332

Filed under:
|
|

Hello,

I am attempting to prevent default anchor behavior in Safari using the jQuery library. Unfortunately, the standard techniques of returning false or using event.preventDefault() do not seem to be working in Safari.

Could anyone help me with this issue?

The code I'm working with is like this:

$('#main .green-tabs a').live("click",function(event){
                    $('.green-tabs a').removeClass('active');
                    $(this).addClass('active');
                    event.preventDefault();
                    var that = this;
                    return LolPage(event,that);});

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about safari