I'm coding a little demo for the History API. And I'm struggling with this:
$(window).bind('popstate',
function(event) {
console.log('pop: ' + event.state);
});
It logs 'pop: undefined' when I click on the 'Previous' button...
But if I do this instead, things are working like expected :
window.onpopstate = function(event) {
console.log('pop: ' + event.state);
};
It logs 'pop: [object Object]' this time...
So it's like jQuery doesn't pass the event object to the callback.
Is there a problem with jQuery ? Or did I mess something ?