I am replacing several hundred PDFs and MS Word reference docs that are very poorly linked/indexed. Ideally I want to create a self contained HTML version. Ideally it would be hosted, but it's possible some people will just copy it to a flash drive for reference.
I confirmed what I have works with MAMP, but is there a way do it it without requiring the user to install something if the just want to use the local files?
I have a simple header and footer files.
header.html
<div style="text-align: right; width: 90%; border-bottom: solid black 3px;">
<img src="img/logo_75x75.png">
</div>
footer.html
<div style="text-align: center; height: 50px; position: relative; border: 1px solid black;">
<img src="img/image.jpg"><span style="margin-left: 150px; position: absolute; top: 50%; left: 50%; -ms-transform: translate(-50%, -50%); transform: translate(-50%, -50%);">SOMETEXT<span>
</div>
I'm using the method from This Stackoverflow Article and have the following test.html file.
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<script>
$(function(){
$("#headerDiv").load("header.html");
$("#footerDiv").load("footer.html");
});
</script>
</head>
<body>
<div id="headerDiv"></div>
<div id="footerDiv"></div>
</body>
</html>
It doesn't work. Nothing is displayed. I've tried just the header in the function, and just the footer in the function and that didn't help either.
I'm not sure what I' missing here.