• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 354
  • Last Modified:

jquery animation

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');
  • 2
1 Solution
Kiran SonawaneProject LeadCommented:
Check below link

Code is here

<!DOCTYPE html>
<title>Kiran Test</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></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

charmingduckAuthor Commented:
thanks, but why the load() is not working here?
Kiran SonawaneProject LeadCommented:
Check the use of jquery load method http://api.jquery.com/load/

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now