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

Home Forums JavaScript .setTimout and .delay Re: .setTimout and .delay


I can’t seem to find out how to delay the removeClass until the menu is fully collapsed. Currently, the class is removed and the box shadow is gone before it begins to retract, and I’d like to add a delay to prevent that.

Im sorry, call me ignorant but after i read this i didnt read any more.. Sounds to me like all you need is a callback function.

$('#slider span').toggle(
function() {
left: 0
}, 'slow').addClass('active');
}, function() {
left: '-90%'
}, 'slow', function() {

Is this what you want?