Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Javascript/JQuery question

  1. #1
    Member Charlie's Avatar
    Join Date
    Jun 2010
    Location
    Sweden
    Posts
    41
    Thanks
    1
    Thanked 5 Times in 5 Posts

    Default Javascript/JQuery question

    Soooo, I know its not JAVA per se, but its pretty close.
    Basically, if anyone here has any animation-handling skeelz in jQuery, youre more than welcome to help out .

    I basically want 2 different divs to be animated AFTER eachother by pressing one of them. I've got the animations working ofc, but I've tried everything to make them not start at the same time:

    Queing them, using callback for the second animation, upping/downing the speeds, changing the duration instead of the time attribute etc.

    The code itself is :

    function enlargeMovie(){
    	$('#movieExtender').animate({ 
    	paddingBottom: "77px"
      },  700 );	
    	document.getElementById('movieBox').style.visibility="visible";
    	$('#movieBox').animate({ 
    	width: "475px"
      },  700);	
    }

    and the result can be seen on Judetub (press the movie "button" to extend a slider).

    Thx
    // Charlie


  2. #2
    Member
    Join Date
    Apr 2010
    Location
    The Hague, Netherlands
    Posts
    91
    Thanks
    3
    Thanked 10 Times in 10 Posts

    Default Re: Javascript/JQuery question

    Try:
     $('#movieExtender').animate({paddingBottom: "77px"}, 700, function() {	
    	$('#movieBox').show().animate({width: "475px"},  700);
    });

Similar Threads

  1. Javascript Bubble Sort
    By Fidelacchius in forum What's Wrong With My Code?
    Replies: 17
    Last Post: May 24th, 2010, 04:43 PM
  2. calendar javascript required
    By sagar13 in forum Paid Java Projects
    Replies: 0
    Last Post: February 5th, 2010, 12:57 AM
  3. Replies: 4
    Last Post: February 4th, 2010, 03:21 AM
  4. How can i put session in Javascript?
    By rajani in forum JavaServer Pages: JSP & JSTL
    Replies: 2
    Last Post: July 8th, 2009, 12:46 PM
  5. Replies: 3
    Last Post: May 18th, 2009, 03:45 AM