Cover up "white flash" when menu loads.

jQuery based Accordion Menu with many themes.
Post Reply
norman
Site Admin
Posts: 1226
Joined: Sat Feb 07, 2004 9:55 pm

Cover up "white flash" when menu loads.

Post by norman » Tue Jul 10, 2018 1:01 pm

A large menu may display a disconcerting white background (or whatever colour your page background is) when the menu is loading.
This can be covered up by doing the following:
Go to Design / Library / layouts / AccordionJQ / Accordion Menu.
Around line 14 is:

Code: Select all

<div class="dpaccordion">
Change it to:

Code: Select all

<div class="dpaccordion dpaccinitial">
Go to Design / Library / layouts / AccordionJQ / Accordion Setup.
Around line 29 is:

Code: Select all

</style>
Immediately above it add a line:

Code: Select all

	.dpaccinitial {background:#8aa8c4;}
Change the 8aa8c4 above to the background colour you want to see while the menu loads.

Around line 34 is:

Code: Select all

		$('#dpacmn').accordion({ 	// enable top-level accordion

Change it to:

Code: Select all

		$('#dpacmn').accordion({activate: function( event, ui ) { $( "div.dpaccinitial" ).removeClass('dpaccinitial') }, 	// enable top-level accordion
Norman

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest