?
Solved

jquery delay sequence

Posted on 2013-01-12
3
Medium Priority
?
281 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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them.

Question has a verified solution.

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

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
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

762 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