Simply binding the window (in jQuery) to popstate, the event is always triggered twice.
$( window ).bind( 'popstate', myFunction );
There's nothing in myFunction() to cause this - I've tried stripping out this function to a simple:
console.log( 'triggered' );
And the result is the same. It's always triggered twice (tested in Safari, Chrome & Firefox).
I know there are issues with the HTML5 history API, but any advice other than 'try History.js' would be gratefully received!
myFunction()
doesn't seem to have anything to do with the event firing twice. I still get the issue in FF 10.0.1 (OSX) – Boohoo