javascript - Safari's window.history.go(index) is off by 1 -


i'm trying make button takes user 2 pages, i've noticed odd safari. here working function:

jquery(function(){   jquery('.go-back').click(function(e) {     if(jquery.browser.safari) {       window.history.go(-3);     } else {       window.history.go(-2);     }   }); }); 

does have explanation why indexing off 1 in safari?


Comments

Popular posts from this blog

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -