Jump to content

Delay


Morsusy2k

Recommended Posts

Okay so i have some trouble with delaying,take a look at my code:

$(document).ready(function(){var container = $('div.slider').css('overflow', 'hidden').children('ul'),  slider = new Slider( container, $('#slider-nav') );$(".button1").click(function(){container.animate({  'margin-left': -1800});});});

And this works fine.But what i want it to do is something like this:

$(".button1").click(function(){container.animate({  'margin-left': -1800  .delay(600);  'margin-left': -1200  .delay(600);  'margin-left': -600});

But i cant manage to make it right..can anyone help?Thanks :)

Link to comment
Share on other sites

Hello friend, animate({margin-left: -1800} ,{duration:500});use this code instead of using delay function.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...