addClass compatibility issue?

10 views
Skip to first unread message

Yak

unread,
Apr 30, 2013, 5:48:12 AM4/30/13
to jqt...@googlegroups.com
Hello,

I have a little problem with this simple code:

$("#favSearch").on('click',function(){
        if(favStatus){
            $(this).removeClass('active');
            favStatus=false;
            search(table);
        }else{
             $(this).addClass('active');
             favStatus=true;
             search(table);
        }
    });

If JQT is not loaded, the code work properly. But when loaded, the class is added and instantly removed.

As I'm new to JQT, I was wondering if I had missed something...

Thanks!

Yak

unread,
Apr 30, 2013, 5:50:45 AM4/30/13
to jqt...@googlegroups.com
Is there something with milliseconds delay ? as if the code was re-run a second time after a few ms...

Yak

unread,
May 1, 2013, 2:50:00 AM5/1/13
to jqt...@googlegroups.com
I finally found the solution: .active is a reserved class name. Just had to change for an other one...
Reply all
Reply to author
Forward
0 new messages