Jump to content

[SOLVED] Executing a script (line) after another script (line) has run?


Edward

Recommended Posts

 

Hi,

 

I've recently discovered jQuery which has helped me a lot, as I don't have a great knowledge f javascript. I know what I want two things to happen when a certain link is clicked. I can make both things happen, but I want one to happen after the other (ideally I want to make it happen AFTER, but if not specifiable, then with a 500 milliseconds delay so it will be after). Is this possible? Here is my script at the moment which makes them both happen at the same time. (jQuery is installed on my server). Thank you in advance.

 

$("#preview_20080408_off_link").click(function() {
$("#preview_20080408_image").animate({opacity: "0"}, 500);
$("#preview_20080408_on_container").show(); // This should happen AFTER the line above is complete
return false;
});

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.