I would really appreicate any help on this matter. Here is the code that I have so far:
$('.Ajax_links').click(function() {
window.location.hash = $(this).attr("href");
var href = $(this).attr('href');
$('#contaniner_div').load(href);
$('data-target').click(function() {
var data-target = $(this).attr('data-target');
$('#contaniner_Div_Nav').load(this.data-target);
}
return false;
});
I would like that messed up code above to load contents into these two divs below when the link with the class set to (class="Ajax_links") is clicked:
<div id="contaniner_Div"></div>
<div id="contaniner_Div_Nav"></div>
This is how the link looks:
<a href="files/content.html" class="Ajax_links" data-target="files/navigation.html">
The first method that I was working with with the rel instead of the data-target method loaded content into these two divs when the link is clicked but the rel part of that content was not included into the hash. Making it impossible for me to bookmark the rel part of link or if I wanted to go back/forward by using the browsers buttons. (I'm using the ben Alman plugin). So now I am searching for a different method, but my code doesn't work. Could someone please help me?