I'm attempting to animate an element first, followed by adding a class once the animation is complete:
$(this).animate({ width: "1em" }, 500);
$(this).addClass("hidden");
However, the addClass function executes immediately.
Is there a method to instruct it to "Wait until Animation is finished?"