I have done AJAX loading in the past through wordpress so know my way around it. However I haven't loaded in the contents of an entire page before.
What I'm wanting to do is:
Hijack clicks to internal URLs and AJAX load the content of their urls into a main content div.
I'll wrap the header/footer/sidebars in my post/page template files in a function to check if the load request was made by ajax. If it was it will not echo those in the file.
To do this I need to know how to get the html content of a url in my functions.php. After hours of searching I can't find anything that will let me do it. All the things I've relate to echoing out small portions of the content and not then entire page HTML.
It would be great if someone could point me in the right direction!