When i press $('.walk-previous-button') i want to disable the click event until the animation is finished. The below isn’t working.
$('.walk-previous-button').live('click',function() {
var stringcontainer = $('#walk-string-parent-container');
$('.walk-previous-button').unbind('click');
stringcontainer.animate({'scrollLeft': '-=340'}, 1500,function() {
$('.walk-previous-button').bind('click');
//code
}
});
Try using the
:animatedselector to check if the element is being animated.