Skip to content
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

Flash of Dropdown on pageload #205

Open
LizNix opened this issue Jun 21, 2016 · 5 comments
Open

Flash of Dropdown on pageload #205

LizNix opened this issue Jun 21, 2016 · 5 comments

Comments

@LizNix
Copy link

LizNix commented Jun 21, 2016

I've been using this navigation menu in my bootstrap/underscores wordpress starter theme. Over my last few projects I've developed the following method for dealing with the flash of dropdown on page load for desktop (above the breakpoint viewport size.)

  1. Set 'hover':false option when initiating flexnav

  2. use old school show/hide css in the media query targeting viewports above the breakpoint:

@media (min-width:800){
        .flexnav li > ul {
            display:none;
        }
        .flexnav li:hover > ul {
            display:block;
        }
    } 
  1. To override the inline style set by the core js plugin code, I then add !important to display:block.

That works but using !important indicates to me that there's a better way. Any ideas?

@torian257x
Copy link

wouldn't even have noticed this problem without your comment. Did you find by now a better solution?

@LizNix
Copy link
Author

LizNix commented Jul 6, 2017 via email

@torian257x
Copy link

the thing is, the last update this plugin has seen is 4 years ago. And it even states that browser support is IE7-10. No mention of 11 (maybe wasnt out that time)

maybe by now, there is a better solution?

@torian257x
Copy link

might wanna consider this one:

https://github.com/joeldbirch/superfish

@LizNix
Copy link
Author

LizNix commented Jul 6, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants