I'm trying to externalize the header section (which will change often) as it's own HTML file, and use jQuery to load it with the .load function. I have saved the file to be used in a separate folder and load the element FIRST, then the script (I have declared jQuery 1.10 btw)
Here is the code: in the page where I want it to go:
<div id="header"></div>
<script type="text/javascript">
$(document).ready(function(){
$(‘#header').load(‘externals/header.html');
});
</script>
and the file is in a folder called 'externals'
However the page does not load the header. Here is the page code, for what that's worth:
<div class="logo">
<h1><a href="../index.html"> <img src="../images/logo.png" alt="Whitehouse Dezigns - Custom Built Streetrods"></a></h1>
</div>
<div class="head-icon">
<a href="https://www.facebook.com/whitehousedezigns" class="head-icon-01" target="_blank"></a>
<a href="http://instagram.com/whitehouse_dezigns" class="head-icon-02" target="_blank"></a>
<a href="https://youtube.com/channel/UC7zCRezIASm4EaZLM_ADn3w" class="head-icon-03" target="_blank" target="_blank"></a>
<div class="clear"></div>
</div>
<nav>
<ul class="sf-menu">
<li class="current"><a href="index.html">Home</a></li>
<li><a href="../about.html">About Us</a></li>
<li><a href="../services.html">Services</a></li>
<li><a href="../gallery.html">Gallery</a></li>
</li>
</ul>
<div class="clear"></div>
</nav>
<div class="clear"></div>
</div>