How do you loop a jQuery Function?

  You are currently not logged in. You can view the forums, but cannot post messages. Log In | Register

29-Jun-11 15:36
I need help. How do I loop this function so it repeats forever?


$(document).ready(function() {
$('.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, achieved using jQuery
});
15-Aug-11 15:30

$(document).everyTime(10, function (){
$(".first").animate(...);
...
});


you need jQuery Timers, though.
http://plugins.jquery.com/project/timers

plain setInterval() also works.

--
http://www.GetFreeDomain.Name/

 
New posts
Old posts

Follow Elated