I was until recently using $.load() to get a specific piece of another page and load it into the current one, but as the user initiates those requests they can queue up and I found myself needing a way to abort them lest click-happy users break my page.
This led me to $.get() which works great and lets me abort the request if another is launched before the first returns, but now I need to parse the returned html (it’s an entire page with doc-type and head elements) and only get one div from it.
How do I achieve this?
This should work: