I can't figure out how to add the history plugin functionality to my (really simple) ajax code.
Here's my code so far:
$(function() {
$.ajaxSetup({ cache: true });
var hijax = $('ul.hijax a');
var loader = $('<div id="spinner"></div>');
hijax.click(function(e){
hijax.removeClass('ajax-on');
$(this).addClass('ajax-on');
var url = $(this).attr('href') + ' #biog-container';
$("#ajax-container").html(loader).load(url);
e.preventDefault();
});
});
This pulls the contents of the the linked page containing a div with an id of 'biog-containers' (The is a list of names with links to peoples' biographies - it's a site for a baroque orchestra!).
The ajax calls works great (yay jQuery!), but I've googled and googled about adding support for the history plugin and (stupid front-end guy that I am) I just can't figure it out.
Thanks for the help.