I'm trying to implement back button on this full ajax website.. I tried jquery history plugin but I'm sure I messed something, as the hash appears OK but the back button won't load the original content back..
This is what my menu looks like:
<div id="nav" class="ajaxload menu">
<ul>
<li><a href="home.aspx">Home</a></li>
<li><a href="about.aspx">About Us</a></li>
<li><a href="contact.aspx">Contact</a></li>
</ul>
</div>
And the ajax calls:
$(function() {
var $content = $('#content');
$('.ajaxload li a').click(function() {
$content.html('<div id="loader"></div>');
var url = $(this).attr('href');
$.get(url, function(data) {
$content.hide().html(data).fadeIn("slow", function() { $("#loader").fadeOut("fast") });
});
return false;
});
});