Firefox Recovery Control

I have a page containing several checkbox input elements. Switching these parameters changes the appearance of the page so that it can only be done in Javascript.

My problem arises when you close and reopen the page. A short-term (seemingly inconsistent) moment after the page loads, Firefox restores the state of the flags without raising their onchange events.

Is there a way to determine when Firefox restores these items, or at least is there a way to disable this feature without requiring users to change browser settings?

I also use jQuery if you have something that might help.

Use autocomplete="off"on inputs is not affected.

+5
source share
2 answers

If you just need to run change handlers to match the state of the page with the user's last preference (which seems like a good idea), then something like this should do the trick.

$(window).load ( function () {
    $('input:checked').change ();
} );


See the demo in jsBin .

+4
source

"Toggling these options changes the look of the page."

. , . "change" . , , . , , , .

- , .

+2

All Articles