troubleshooting Question

Small JQuery doesn't hide element

Avatar of Sheritlw
SheritlwFlag for United States of America asked on
4 Comments1 Solution261 ViewsLast Modified:
I have an htm page that is supposed to run 2 animations, one after the other.
On this page I have a few divs that are to be displayed according to which animation is running.
When testing the animations it runs the first one great, but doesn't set the css display to none and then run the 2nd div.

What am I doing wrong?

<script type="text/javascript">
   $(function() {

         width: "95%"
      }, 5000);
      $("#pic").animate({ marginLeft: '+=0px' }, 5000);
      $("#Bar").css("display", "none");
      $("#pic").css("display", "none");
      $("#divagain").css("display", "block");
      $("#divagainbrush").css("display", "block");
         width: "95%"
      }, 5000);
      $("#divagainbrush").animate({ marginLeft: '+=0px' }, 5000);

Steve Krile

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros