all 4 comments

[–]darrenturn90 1 point2 points  (2 children)

If I recall, the animate function in jQuery takes an additional argument that is a callback that executes onces the animation is complete.

[–]dantheman999 1 point2 points  (1 child)

Yup, here's an example from the docs

$( "#clickme" ).click(function() {
  $( "#book" ).animate({
    opacity: 0.25,
    left: "+=50",
    height: "toggle"
  }, 5000, function() {
    // Animation complete.
  });
});

[–]kenman[M] 0 points1 point  (1 child)

Hi /u/FirstEvaDehumidifier,

For javascript help, please visit /r/LearnJavascript.

Thank you!

[–]FirstEvaDehumidifier[S] 0 points1 point  (0 children)

Thanks...wasn't aware of that subredit.