How to remove class Conditionally ?

Posted by Wazdesign on Stack Overflow See other posts from Stack Overflow or by Wazdesign
Published on 2010-05-10T12:33:08Z Indexed on 2010/05/10 12:44 UTC
Read the original article Hit count: 232

Filed under:
|
|
$("li").hoverIntent({
                sensitivity: 3, 
                interval: 200, 
                over: addOver, 
                timeout: 500, 
                out: removeOver
            });
        function addOver(){ $(this).addClass('over').children('a:first').addClass('active');}
        function removeOver(){ $(this).removeClass('over').children('a:first').removeClass('active');}
        alert ('version 2 menu');
});

On mouseout I want to remove class of " li > a" if it already dont have class. I want to remove the class of the children.

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about JavaScript