flexnav
flexnav copied to clipboard
Flash of Dropdown on pageload
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.)
-
Set
'hover':falseoption when initiating flexnav -
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;
}
}
- To override the inline style set by the core js plugin code, I then add
!importanttodisplay:block.
That works but using !important indicates to me that there's a better way. Any ideas?
wouldn't even have noticed this problem without your comment. Did you find by now a better solution?
Hi, I'm still using flexnav, I just set hover to false when I initialize it and handle the dropdown behavior with css.
On Jul 6, 2017 1:57 PM, "Jossnaz" [email protected] wrote:
wouldn't even have noticed this problem without your comment. Did you find by now a better solution?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/indyplanets/flexnav/issues/205#issuecomment-313487883, or mute the thread https://github.com/notifications/unsubscribe-auth/AAWL4SvUyx3GKom-L1UC9ORiWyNaEIV7ks5sLS4rgaJpZM4I6ZQn .
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?
might wanna consider this one:
https://github.com/joeldbirch/superfish
It works great in edge, and all the modern mobile browsers.
Thank you for the suggestion, I will look into it, but I'm in the process of building a new theme and moving away from Jquery as much as possible.
Until that's ready I'm still using my bootstrap 3 starter theme for the bread and butter work. Do you mind if I continue to use flexnav with it for now?
Liz Nix http://bolddreamstudio.com
On Thu, Jul 6, 2017 at 2:38 PM, Jossnaz [email protected] wrote:
might wanna consider this one:
https://github.com/joeldbirch/superfish
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/indyplanets/flexnav/issues/205#issuecomment-313497927, or mute the thread https://github.com/notifications/unsubscribe-auth/AAWL4dn4q5iGpyXJP6-UOLT2fNBOzkHRks5sLTfNgaJpZM4I6ZQn .