First, you are missing parentheses in a conditional expression:
if ($("#about").hasClass("opened")) { $("#about").animate({right: "-700px"}, 2000); }
But you can also simplify this:
$('#about.opened').animate(...);
If #about does not have an opened class, it will not be animated.
If the problem is related to the animation itself, we will need to learn more about your positioning of the element (absolute absolute inside relative parent? Does the parent have a layout?)
Ken Redler Dec 30 '10 at 18:16 2010-12-30 18:16
source share