I have boot navbar in file navbar.htmland I load it into my HTML page usingJquery.load()
I have this at the bottom of my HTML page:
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script>
$(function(){
$("#navbar-partial").load("navbar.html");
});
</script>
and <div id="navbar-partial></div>are located on the HTML page.
After partially displaying in the navigation bar, I have the main content div with everything else on the page. The main content is loaded first, and then the navbar makes it look “sticky”. If I put the navigator code in every file that it downloads first and never seems to change, it loads quickly, but I want to extract the code into one file, so I don't need to edit it everywhere.
Any ideas on making the navigation part load first or faster? I moved the script tags to the head, and that didn't help either.
thank