Suppose that stuff
contains a considerable amount of html including an element that I want to fill in the line following this one:
$("#content").html(stuff);
Can the following line go ahead and fill the element defined in stuff
or is it possible that the code is still running?
If the code will have finished running is it still possible that the element won't exist because the browser won't have rendered it yet?
I know that when I'm using .load (for the initial download of the element) that I'll have to use a callback, but the callback which comes with .html() isn't a do-this-when-done thing like they usually are, which is what has left me really confused. Given the similarity between .html and .load and knowing that .load is asynchronous my gut is telling me that .html must be too, but I can't find any indication either way. Please help.