Go Premium for a chance to win a PS4. Enter to Win


jquery animation

Posted on 2011-09-08
Medium Priority
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 500 total points
ID: 36502129
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


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 http://api.jquery.com/load/

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

Question has a verified solution.

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

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
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…
Suggested Courses

782 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