jquery animation

Posted on 2011-09-08
Last Modified: 2012-05-12
I want after the p shows up, the span comes in, but it's not working, what am I doing wrong here?


   $('p').animate({opacity:1, color:'#c03', marginLeft:'200px'},'slow').load(function(){ yeahBaby();  });
   function yeahBaby(){

         $('span').animate({opacity:1, duration:5000},'slow');
Question by:charmingduck
  • 2
LVL 17

Accepted Solution

sonawanekiran earned 125 total points
ID: 36502129
Check below link

Code is here

<!DOCTYPE html>
<title>Kiran Test</title>
<script type="text/javascript" src=""></script>
<script type="text/javascript">
 $('p').animate({opacity:1, color:'#c03', marginLeft:'200px'},'slow',function(){yeahBaby();});
   function yeahBaby(){
     $('span').css('display', 'block');
       opacity: 1,
       duration: 5000
     }, 'slow');

  <p>This is para</p>
  <span>This is span</span>

Open in new window


Author Comment

ID: 36502169
thanks, but why the load() is not working here?
LVL 17

Expert Comment

ID: 36502179
Check the use of jquery load method

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this article, we'll look how to sort an Array in JavaScript, including the more advanced techniques of sorting a collection of records either ascending or descending on two or more fields. Basic Sorting of Arrays First, let's look at the …
The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now