Understanding the way .get() works

Understanding the way .get() works

Hey all,

I'm relatively new with using jQuery, and I needed to ask a question about get().  I know load works with what I'm doing, but I'm trying to wrap my brain around get().

 Currently I have two pages on the same server, and on my first page I'm calling .get() the following way:

  1. $.get("http://server01/index.php?/runs/plot/39&format=outline", function(data) {
  2.            console.log("Data Loaded: " + data);
  3.         });

I'm running it that way just to test if the HTML grabbed is coming back correctly.  Instead of grabbing the HTML of the entire page though, this particular instance for me only grabs the HTML from half the page.

I believe that a script running on the second page isn't done generating code yet when the get() is grabbing from it, and think that a solution would be to have my script wait until that second page fully loads before getting anything.  Is there a way to do this? Can i put a document.ready call inside of a get call? And if so, how do I format it?

I've had get() grab an entire page's contents for other pages on the server, and I'm not sure what circumstances would stop it mid process.