I have a Footer which I am including on all my pages by JS:
includeHTML("footer.html", document.querySelector(".footer"));
But in that, I want the simple copyright rule:
<p>Copyright © <span id="getDate"></span> NameHere All Rights Reserved</p>
<script type="text/JavaScript"> let theDate = new Date().getFullYear(); document.getElementById("getDate").innerHTML = theDate;
</script>
I can get this to work on a standard page in JSBin or similar and there appears nothing wrong with the logic. But it won't run in the "includeHTML" file when I run the page.
So, how do you includeHTML with JS in the included HTML file?