On my page I have 3 tabs setup using this code along with some CSS
<ul class="subnav" id="subnav">
<li class="active"><a href="#subover">Overview</a></li>
<li><a href="#subnews">News</a></li>
<li><a href="#subgallery">Gallery</a></li>
</ul>
Inside the news Tab, I'm using .load to fill it from page arc.php and id=news.
<div class="subcont" id="subnews">
<script>
jQuery(document).ready(function ($) {
$('#subnews').append($('<div>').load('arc.php #news'));
});
</script>
</div>
On the arc.php page, I have news descriptions with links to the articles. When the article link is clicked. I want it to load into the subnews div. I'm doing that with this.
<script>
jQuery(document).ready(function ($) {
$("#subnews").on("click", "a", function (e) {
$("#subnews").load($(this).attr("href"));
e.preventDefault();
});
});
</script>
Now my problem...
When the news article is loaded, the url is not changed, so I'm not able to use back to get back to the news article list.
I do have code tracking hash tags, and it works when I change from Overview, News, and Gallery. I can use back to go back through the tabs.
Is there a way to add a hash tag to the url when the article is clicked in order to use tracking and be able to click back?