It is a simple doubt:
When we use something like $('#content').load( "page.php #content");
, it loads the entire page.php
"in server-side" and then extract #content
element or it loads only the specified element?
Beyond that, is this $('#content').load( "page.php #content");
the same as this:
$.ajax({
url:"page.php",
type:'GET',
error: function(){
alert("Oops!"); // Em caso de o AJAX dar erro (opcional)
},
success:
function(data){
$('#content').html($(data).find('#content').html());
}
});
When it comes to "method to get from the server"?