Thanks AussieJohn, delegate will certainly be useful, and will most definately speed up my script. But it's not really the event that I'm worried about. What I'd like to know is: is there a way of appending data from an ajax call, rather than loading it.
In the case of the load method, let's say i do this:
The result will be:
... some content ...
Where what I want is:
... some content already in the DOM...
... fetched content from remote html ...
Which is basically appending the fetched div, rather than loading it, which will replace the contents of the target div with the new div.
I thought perhaps I could do this by instead of loading the fetched div into the DOM, I could store it into a variable, and then append that. Something like:
var html = $.load('example.html #fetch');
Is that possible?