Javascript inconsitency with Safari/Mac
var first = true;
$(window).bind('statechange',function(){
if ( first ) { first = false; return; };
// stuff
});
I've tested nn FF and Chrome for Mac and Linux, this works as it should (prevent reloading of the Ajax Part on the first load of the page) but in Safari it prevents the first user activated reload. If I comment out those bits:
//var first = true;
$(window).bind('statechange',function(){
// if ( first ) { first = false; return; };
// stuff
});
FF and Chrome for Mac and Linux will reload the Ajax bit directly on the first page load. Safari won't.
Can you tell me how to solve this?
Thanks, thomas
Edit: It turned out to be a problem in history.js
...
精彩评论