Edward Posted April 22, 2008 Share Posted April 22, 2008 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; }); Quote Link to comment Share on other sites More sharing options...
RichardRotterdam Posted April 24, 2008 Share Posted April 24, 2008 Just use the SetTimeOut function http://www.w3schools.com/js/js_timing.asp Quote Link to comment Share on other sites More sharing options...
Edward Posted April 24, 2008 Author Share Posted April 24, 2008 Thank you!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.