So I have a menu:
<nav id="side-nav">
<ul>
<li><a href="consulting">Consulting</a></li>
etc..
jQuery reads
$(document).ready(function() {
$( "#side-nav ul li a" ).on( "click",function() {
$('#services-content').load('side-menu.html #' + $(this).attr('href'));
return false;
});
});
and have an html file with corresponding id's to the href. It does not load. Thought i followed exactly as per jquery website. Whats wrong ?
Even if I have it hard coded, nothing is loaded :
<div id="services-content">
</div><!--load services content in here-->
<script type="text/javascript">
$(document).ready(function() {
$('#services-content').load('side-menu.html #consulting');
});
</script>