[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

jquery delay sequence

Posted on 2013-01-12
3
Medium Priority
?
286 Views
Last Modified: 2013-01-13
Hello Experts,

I hope someone can help me.
For some reason the delay in not working. i am trying to increase delay on each div.

var delay = 50;

$('#valeri-logo div').each(function (i) {
		 
			$(this).animate({right:0}, 100, "easeInOutBack", function() {
			$(this).delay(delay).animate({left:-100}, 1800, "easeInOutBack").fadeOut(1500);
				i * (delay * 1500);
		});

Open in new window

0
Comment
Question by:Refael
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 11

Accepted Solution

by:
mcnute earned 2000 total points
ID: 38771705
if you're trying to increase the delay then you should do something like this:

var delay = 50;
var i =  0;

$('#valeri-logo div').each(function () {
		 
			$(this).animate({right:0}, 100, "easeInOutBack", function() {
			$(this).delay(delay).animate({left:-100}, 1800, "easeInOutBack").fadeOut(1500);
                                 i++;
				delay = (i* 1500);
		});

Open in new window


That will increase your delay by the result of multiplying i with 1500, with i increasing by one on each iteration in the each loop.
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 38772251
I'm not clear. Are you just trying to increase the delay, or what mcnute is suggesting and increasing it more with each iteration?

Cd&
0
 

Author Comment

by:Refael
ID: 38773334
mcnute, thank you.
COBOLdinosaur , yes i just wanted to delay in sequence... first end then second begin.
mcnute solution is right to the point :-)
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn how to dynamically set the form action using jQuery.
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)
Suggested Courses

656 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