I'm using the Tabs from jQuery Tools to create a wizard. I have prev and next buttons successfully navigating between the panes, but they don't change the hash and don't contribute to the browser history (at least not in FF). Do I have to add something to my next & prev handlers? Maybe change the location.href of the buttons to #<next-page-id>
? I kind of thought the Tools would do that for me....
my.wizard = function() {
var api;
var $next, $prev;
var init = function() {
$next = jQuery('.wizardFoot .next').click(next);
$prev = jQuery('.wizardFoot .prev').click(prev);
// init the tabs
jQuery(".wizardNav ol").tabs("div.wizardBody div.wizardPane", {
history: true
});
api = jQuery(".wizardNav ol").data("tabs");
};
var next = function() {
console.info('next');
api.next();
return false;
};
var prev = function() {
console.info('prev');
api.prev();
return false;
};
return {
init: init
};
}();