I have a simple HTML page with these jQuery statements:
$(document).ready(function() {
$('#myDiv').load('mypage.html');
});
For some reason this doesn't load any HTML to the div. I used this method to make sure the source file exists - everything checks out fine. I tried using the error callback on .load()
and the status is "error", but the response is empty. Looking at the console I see the following GET request:
[12:18:20.770] GET http://localhost/ [HTTP/1.1 200 OK 0ms]
Finally, when I do a simple $('#myDiv').html('test');
it loads fine, so I know the div is set up properly.
Can anyone think of what's going wrong here? I'm running WAMP on Windows, if that's any help.