[jQuery] Waiting for a CallBack function to end before continuing
Hi!
I'm just starting with jQuery and so far it's been amazing. Small,
powerful and very easy to use.
I have a question, please take a look at this simple code:
$.get("search.php", function () {
// code 1
alert("$.get is done");
});
// code 2
alert("This should always appear after $.get is done");
What should I do to make the script wait for $.get's response so it can
execute code 1 before going on to code 2?
Thanks in advance!
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/