Reputation: 3875
I purchased a theme.
When we load the home page, the navbar appears without effects for 1 second and then disappears. I don't know what's causing the issue.
I tried to place all the scripts in header as well but the issue still persists. Can any1 guide me? You can open the above link and press Ctrl F5
to see what I mean.
Upvotes: 0
Views: 43
Reputation: 6684
It seems that navbar becomes hidden only when some css classes (.mm-menu.mm-offcanvas
) are applied but these classes are applied only when jquery plugin ( jquery.mmenu.min.all.js ) file is loaded and plugin is triggered. You can hide navabr by default in css:
#mobile-menu {
display: none;
}
Instead of using id to style element you should use a class. ID selectors have high specifity so they take precedence over class selectors and in your case visibility styles applied by the jquery plugin can be overridden and as a result navbar may not be visible even on mobiles. You can also use :not
pseudo class (even with id selector):
#mobile-menu:not(.mm-menu) {
display: none;
}
Upvotes: 1