I have a page that contains multiple checkbox input elements. Toggling these alter the appearance of the page in a way that can only be done in Javascript.
My problem arises when you close and reopen the page. A brief (seemingly inconsistent) moment after the page loads, Firefox restores the state of the checkboxes without raising their onchange events.
Is there a way to determine when Firefox recovers these elements, or at the very least, is there any way to disable this functionality without requiring the users to change their browser settings?
I am also using jQuery, in case that has anything that can help.
Using autocomplete="off"
on the inputs has no effect.
If you just need to fire the change handlers, to match the page's state to 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 at jsBin.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With