xxxxxxxxxx
$(function () {
var includes = $('[data-include]')
$.each(includes, function () {
var file = 'views/' + $(this).data('include') + '.html'
$(this).load(file)
})
})
xxxxxxxxxx
<!DOCTYPE html>
<html>
<head>
<title>My Webpage</title>
</head>
<body>
<h1>Hello, World!</h1>
<p>This is a paragraph.</p>
<a href="https://www.example.com">Click me</a>
</body>
</html>
xxxxxxxxxx
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Title here!<title/>
<link rel="stylesheet" type="text/css" href="yourFile.css">
<head/>
<body>
<body/>
<html/>
xxxxxxxxxx
<div data-include="header"></div>
<div data-include="footer"></div>
xxxxxxxxxx
<head>
<link rel="import" href="/path/to/imports/stuff.html">
</head>