jquery menu issue on load

269
November 23, 2016, at 7:53 PM

I created a menu in my website, this menu have 4 submenu.

But there is a problem on page reload / page load.

This is my page: http://www.substellar.it/nepsrl/

if you try to refresh the page, you'll notice that the 4 sub menus for one second are still visible.

Why?

This is the script that manages the submen:

http://www.substellar.it/nepsrl/js/menu.js

I can not solve this annoying problem graph.

Answer 1

This happens because you hide your menu after page is loaded. Instead of use $( ".nep-submenu1" ).hide();, you should hidde your menu on your html or css like this:

html:

<div class="nep-submenu1" style="display: none;">

css:

.nep-submenu1{
   display:none;
 }
Rent Charter Buses Company
READ ALSO
A workaround for background-position on a:visited links

A workaround for background-position on a:visited links

I've read here that background-position is no longer allowed to be modified for a:visited links in CSS due to a security vulnerability. (MSDN info) I've seen a few items that suggest there is a workaround with jQuery or javascript, but I'm not fluent...

282
Image with text caption in a fixed-sized div

Image with text caption in a fixed-sized div

I'm facing a CSS/HTML problem,.

315
Open all hyperlinks on a given page in new tabs

Open all hyperlinks on a given page in new tabs

I would like to open all links on a given webpage in new tabs at once using JavaScript. Lets take the Stack Overflow question list as an example.

306
Bootstrap dropdown not working when I append it with &lt;div&gt;

Bootstrap dropdown not working when I append it with <div>

Im having trouble with my bootstrap dropdown. it is not working when I append it with div.

360