How to loop jQuery?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Carol B
    New Member
    • Jun 2011
    • 1

    How to loop jQuery?

    How can I loop this function to play forever?

    Code:
    $(document).ready(function animateText() {
    		$('.first').animate({right: '1500px'}, 3000); //Do you know?
    		$('.first').animate({left: '1000px'}, 500); //Do you know?
    		$('.shadow1').delay(3800).show(1000); //under What this is
    		$('.second .a').delay(3800).show(500); //What
    		$('.second .b').delay(4000).show(500); //This 
    		$('.second .c').delay(4200).show(500); //Is?
    		$('.third').delay(6200).animate({left: '125px'}, 500); //DO YOU KNOW? bottom of screen
    		$('.shadow1').delay(1800).hide(500);
    		$('.second .a').delay(3500).animate({bottom: '30px'}, 300); //What
    		$('.second .b').delay(3800).animate({bottom: '30px'}, 300); //This 
    		$('.second .c').delay(4100).animate({bottom: '30px'}, 300); //Is?
    		$('.second').delay(10000).hide(500); //What this is
    		$('.third').delay(3500).animate({top: '125px'}, 500); //DO YOU KNOW? bottom of screen
    		$('.fourth').delay(10500).show(500); //No?
    		$('.fifth .a').delay(12000).animate({left: '85px'}, 300); //Are
    		$('.fifth .b').delay(12300).animate({left: '95px'}, 300); //You
    		$('.fifth .c').delay(12600).animate({left: '180px'}, 300); //Kidding
    		$('.fifth .d').delay(12900).animate({left: '100px'}, 300); //Me?
    		$('.fourth').delay(4000).animate({'font-size': '150px', 'bottom': '50px', 'right': '50px'}, 300); //No?
    		$('.fifth').delay(15000).hide(500); //are you kidding me?
    		$('.fourth').delay(2000).hide(500); //No?
    		$('.sixth').delay(18000).show(1000); //This is a kinetic animation
    	});
    Last edited by Niheel; Jun 29 '11, 10:29 PM.
  • tomvertommen
    New Member
    • Jun 2011
    • 2

    #2
    Code:
        $(document).ready(
    function animateText() {[INDENT][/INDENT]while(true){
                $('.first').animate({right: '1500px'}, 3000); //Do you know?
                $('.first').animate({left: '1000px'}, 500); //Do you know?
                $('.shadow1').delay(3800).show(1000); //under What this is
                $('.second .a').delay(3800).show(500); //What
                $('.second .b').delay(4000).show(500); //This 
                $('.second .c').delay(4200).show(500); //Is?
                $('.third').delay(6200).animate({left: '125px'}, 500); //DO YOU KNOW? bottom of screen
                $('.shadow1').delay(1800).hide(500);
                $('.second .a').delay(3500).animate({bottom: '30px'}, 300); //What
                $('.second .b').delay(3800).animate({bottom: '30px'}, 300); //This 
                $('.second .c').delay(4100).animate({bottom: '30px'}, 300); //Is?
                $('.second').delay(10000).hide(500); //What this is
                $('.third').delay(3500).animate({top: '125px'}, 500); //DO YOU KNOW? bottom of screen
                $('.fourth').delay(10500).show(500); //No?
                $('.fifth .a').delay(12000).animate({left: '85px'}, 300); //Are
                $('.fifth .b').delay(12300).animate({left: '95px'}, 300); //You
                $('.fifth .c').delay(12600).animate({left: '180px'}, 300); //Kidding
                $('.fifth .d').delay(12900).animate({left: '100px'}, 300); //Me?
                $('.fourth').delay(4000).animate({'font-size': '150px', 'bottom': '50px', 'right': '50px'}, 300); //No?
                $('.fifth').delay(15000).hide(500); //are you kidding me?
                $('.fourth').delay(2000).hide(500); //No?
                $('.sixth').delay(18000).show(1000); //This is a kinetic animation
            }
    });

    Comment

    Working...