I have a webpage like:
<html>
<head>
. . .
</head>
<body>
<div id="wrapper">
<p>Lots of content here!</p>
</div>
</body>
</html>
I also have an external file like this:
<div id="more-stuff"><p>Even more content!</p></div>
What I want is for to have a webpage like this:
<html>
<head>
. . .
</head>
<body>
<div id="wrapper">
<p>Lots of content here!</p>
<div id="more-stuff"><p>Even more content!</p></div>
</div>
</body>
</html>
Using jQuery. My guess is something like this:
$(document).ready(function(){
$('#wrapper').append.load('/external.htm');
});
But it won’t work and I can’t seem to find a good solution.
Try something like this:
It tells jQuery to request the html file, and then to run the callback (which in turn appends the data returned by the request) when it is ready.