Forums

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

Home Forums CSS Jquery Slide animation toggle back and forth Re: Jquery Slide animation toggle back and forth

#132513
CrocoDillon
Participant

Less buggy:

var container = $(‘#container’);
var nextTop = 0;
$(‘#arrow’).on(‘click’, function() {
container.stop().animate({
top: nextTop
});
if (nextTop == 0)
nextTop = 210;
else
nextTop = 0;
});