-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flicker on load #425
Comments
No, it's the short time before javascript is loaded (before bootstrap-switch has time to load). The native HTML behind it is a checkbox or radio, so that's what you'll see at first. That "flicker" will differ for each system and network, but should be minimal. |
@Panman8201 i think he refers to the internal delay of execution of init logic, which is indeed perceivable. i'll try to reduce that. |
Yes, you are correct @LostCrew. When the switch inits, I believe the widths and margin-left values are not correct so we see a flash of the wrong switch value. |
Interesting, I think I see what you're talking about using Internet Explorer. (When both on/off labels show up??) Chrome has a slight "flash" of the checkbox before the switch loads. But Firefox has no flicker, shows the switch immediately, looks nice. |
fix in |
I know this is a bit hack-ish, but I put style="opacity:0;" on the input checkbox element. This makes it disappear without removing it from the DOM (so it still receives events and such). And as long as the Bootstrap Switch is in place, you don't ever want the user to SEE the original checkbox anyway. |
Is there a way to eliminate the flicker on load?
press F5 on the following page http://www.bootstrap-switch.org/examples.html
The text was updated successfully, but these errors were encountered: