jQuery popstate event handling in firefox

1.7k views Asked by At

I have got something like this:

jQuery(document).ready(function () {
    jQuery(window).bind('popstate', function () { do sth;});
});

It works like a charm in chrome, but doesn't work in FF (event handler is not fired). When I take this code outside the ready block, the event can be handled, but I don't like it being outside ready block.

Do you know any solutions? Cheers.

1

There are 1 answers

0
kaapa On

Problem solved, just did window.onpopstate = function () {} :)