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;
});

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.