Hi guys,
Could someone tell me if this:
$.ajax({
url: 'test.html',
success: function(data) {
alert("Data Loaded: " + data);
}
});
is the same as this:
$.ajax({
url: 'test.html',
success: function(data) {
alert("Data Loaded: " + $(data).html());
}
});
When retrieving this content:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>blank page</title>
</head>
<body>
<div id="content">Some content.</div>
</body>
</html>
I ask because the second jquery ajax call does not alert. Could someone explain why the two versions of the alerts are not the same please?
Matt.