I’m trying to use jquery load function, but I can’t get the whole content to override the html of current file that I’m loading the extern file from.
Let’s see an example situation:
This the first page where on click I want to load a file.html
<html>
<head>
<script>$(document).load("file.html");</script>
</head>
<body>
Some stuff
</body>
</html>
Here’s example page I want to load:
<html>
<head>
<script></script>
</head>
<body>
Some stuff
</body>
</html>
It is very simple:
$('body').load('/your/file')but why doing this ?!