ajax load multiple pieces of html
So I know that with .load I can load a specific chunk of html. What if I want to load 2 chunks of html in one request?
For instance my current page has
#nav and #content.
My loaded page has the same and I want to replace these 2 elements with the new one (or it contents).
$('#nav').load(loadUrl + " #nav");
$('#content').load(loadUrl + " #content");
So the above doesn't work for me for 2 reasons:
1. I load twice. I don't want to do that (but I also don't want to load the js and all because it will mess things up)
2. This puts #content inside #content
Help would be much appreciated.
Thanks