I want to prevent a second click from firing until an animation is complete.
$('#moveDown').click(function(){
var currentPos = parseInt($('#blog-slider').css('top'));
if (currentPos < 0) {
$('#moveDown').unbind('click');
$('#blog-slider').animate({'top': currentPos + 140},500, function() {
$('#moveDown').bind('click');
});
}
});
Unbind is working fine, but it is not rebinding when the animation is complete, so the animation will only run once.
I did look here but this only confirms that "bind" and "unbind" is the way to get the functionality I need and I still don't understand why it isn't working.