Skip to main content
edited tags; edited title
Link
200_success
  • 145.7k
  • 22
  • 191
  • 481

Is there a better way to deal with this animation? Animation of multiple text elements in sequence

edited tags
Link
Jamal
  • 35.2k
  • 13
  • 134
  • 238
Improved the code indentation, thus losing the scrollbars. Improved the title for clarity.
Source Link

jQuery animations, is Is there a better way to dodeal with this animation?

I feel like this isn't the most effective nor efficient way of doing things:

    line.stop(true, true).show('slide', {direction: whichway}, speed-150, function() {
        title.stop(true, true).fadeIn(speed-200, function() {
            sub.stop(true, true).show('slide', {direction: whichway}, speed-50, function() {
                subtext.stop(true, true).show();
                paragraph.stop(true, true).slideDown(speed);
            });
        });
    });

whichway/speed are dynamic, but other than that it's all stuff that has to be in sync and queued up. 

Is there a more efficient way of doing this?

jQuery animations, is there a better way to do this?

I feel like this isn't the most effective nor efficient way of doing things:

    line.stop(true, true).show('slide', {direction: whichway}, speed-150, function() {
        title.stop(true, true).fadeIn(speed-200, function() {
            sub.stop(true, true).show('slide', {direction: whichway}, speed-50, function() {
                subtext.stop(true, true).show();
                paragraph.stop(true, true).slideDown(speed);
            });
        });
    });

whichway/speed are dynamic, but other than that it's all stuff that has to be in sync and queued up. Is there a more efficient way of doing this?

Is there a better way to deal with this animation?

I feel like this isn't the most effective nor efficient way of doing things:

line.stop(true, true).show('slide', {direction: whichway}, speed-150, function() {
  title.stop(true, true).fadeIn(speed-200, function() {
    sub.stop(true, true).show('slide', {direction: whichway}, speed-50, function() {
      subtext.stop(true, true).show();
      paragraph.stop(true, true).slideDown(speed);
    });
  });
});

whichway/speed are dynamic, but other than that it's all stuff that has to be in sync and queued up. 

Is there a more efficient way of doing this?

Tweeted twitter.com/#!/StackCodeReview/status/124878030509318145
Source Link
Loading