The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Add/remove class by jquery Reply To: Add/remove class by jquery


setTimeout is a native javascript function, not a jQuery method. This means you couldn’t chain it with your other jQuery methods:

setTimeout( function(){
    $( ‘.header-menu’).addClass(‘shadow-menu’);

But I suspect that you could simply put .addClass after .delay (i.e., without using .queue/.dequeue at all).