Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8674261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T19:39:58+00:00 2026-06-12T19:39:58+00:00

The way it’s currently written causes the hide to fire over and over if

  • 0

The way it’s currently written causes the hide to fire over and over if msg.d starts returning ‘false’ from ‘true’ until enough time has passed for the animation to stop.

Is there an isHiding or something?

Thanks in advance!

if(msg.d == "true") {
    if(!$("#addContactEmailError").is(":visible")) {
         $("#addContactEmailError").show('bounce');
    }
    $("#addContactSubmitButton").attr("disabled", true);
}
else {
    if($("#addContactEmailError").is(":visible")) {
         $("#addContactEmailError").hide('slide', { direction: "up" });
    }
    $("#addContactSubmitButton").attr("disabled", false);
}

Edit 1

This is all in a keyup handler.

Edit 2

Using animated only fires the animation when it’s completed. If msg.d changes, but the now incorrect animation isn’t finished, the correct animation won’t fire.

Lame Solution

I used a global boolean to keep track of the state. I hate doing that. Putting up a bounty for a better solution when I can. Thanks to all!

Canceled Bounty

Sorry guys, didn’t realize I had to buy with my own rep. 🙁

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T19:40:00+00:00Added an answer on June 12, 2026 at 7:40 pm

    If you want to stop an animation, mid animation, and make it move from that stopped css state to another, use , most importantly, stop(true, false).

    Bottom line: stop(true,false) “magically” stops the animation in its’ tracks but considers the css to be set to whatever the stopped animation’s css parameters were, so you can continue from that point without trying to guess or figure out how you should animate from the stopped point.

    In other words, if you set the css through animate, but you stopped it, the element animated will remain at whatever css state the stop fired at, but the css settings that were entered in the stopped animation will be the current css settings until changed.

    That’s key. You don’t have to guess where the stop left the css state. You can continue back as if your animation fully completed.

    This is a demonstration of the basics of this concept: http://jsfiddle.net/dYYZP/65/


    Ripped off the base animation from here: Jquery layered animation slide out from under


    Postscript

    Because of the ease of animate, absolute positioning within relative positioning, offset, and stop(true,false), it’s rare that I use any of the built in animations. They’re too clunky and don’t know what you really need. They’re great for the most basic animations, but if you want to make your page shine, those concepts above (which are very easy I might add), need to be harnessed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

any way to set custom cursor from image for a jscrollpane in a jsplitpane
Any way to install a bookmarlet in Mobile Safari from a native app? Has
The way i currently populate business objects is using something similar to the snippet
Way oversimplified example: # Get Some data $query = $db->prepare(qq{ select * from my_table
Hash way works just fine: drummers = Drummer.where(:gender => true) => [#<Drummer id: 1,
The way my team currently schedules jobs is through the SQL Server Job Agent.
The way I currently handle this is by having multiple config files such as:
Best way to extract the minutes and seconds from youtube urls? http://www.youtube.com/watch?v=TjTbNWhsG28#t=1m40s&foo=1&bar=2 where 1m40s
Any way to make this less verbose? var model = ( from MvrTable in
One way I thought was to check the timestamp from the last time it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.