Yes. jQuery’s .load() method loads the same page.php file with the querystring parameters that you have there, and places the response from the server as HTML code in the element that .load() is performed on.
The .load() documentation page says:
This method is the simplest way to fetch data from the server. It is roughly equivalent to $.get(url, data, success) except that it is a method rather than global function and it has an implicit callback function. When a successful response is detected (i.e. when textStatus is “success” or “notmodified”), .load() sets the HTML contents of the matched element to the returned data.
So .load() is a shortcut for jQuery’s .get() method.
The .get() documentation page says:
[indent]This is a shorthand Ajax function, which is equivalent to:
$.ajax({
url: url,
data: data,
success: success,
dataType: dataType
});
[/indent]
So instead of you doing the following ajax request:
$.ajax({
url: link.baseURI + link.pathname,
data: link.search,
success: function (response) {
$(span).html(data);
},
dataType: 'html'
});
you can instead achieve the same thing by using .get()
$.get(link.href, function (response) {
$(span).html(data);
});
which you can also achieve in an easier way by using .load()
$(span).load(link.href);
It’s all ajax. It’s just that .load() helps to remove some of the unwanted complexity from what you are doing, so that you can more easily focus on what the code does, instead of on how to achieve your intended end result.