...

View Full Version : Side Navagation Accordian Flashes



devonfarrell
09-19-2011, 09:59 PM
I got this accordion from this site:

http://www.stemkoski.com/stupid-simple-jquery-accordion-menu/

I'm trying to implement it into this site:

http://tizifolio.com/officelogic/products/reception.php

Why does it expand / flash for a second when the page loads on the products pages.
Examples:
http://tizifolio.com/officelogic/products/occasional.php
http://tizifolio.com/officelogic/products/reception.php

This is the js:

**************************************************************************************************** ********************/
$(document).ready(function() {

//ACCORDION BUTTON ACTION (ON CLICK DO THE FOLLOWING)
$('.accordionButton').click(function() {

//REMOVE THE ON CLASS FROM ALL BUTTONS
$('.accordionButton').removeClass('on');

//NO MATTER WHAT WE CLOSE ALL OPEN SLIDES
$('.accordionContent').slideUp('normal');

//IF THE NEXT SLIDE WASN'T OPEN THEN OPEN IT
if($(this).next().is(':hidden') == true) {

//ADD THE ON CLASS TO THE BUTTON
$(this).addClass('on');

//OPEN THE SLIDE
$(this).next().slideDown('normal');
}

});


/*** REMOVE IF MOUSEOVER IS NOT REQUIRED ***/

//ADDS THE .OVER CLASS FROM THE STYLESHEET ON MOUSEOVER
$('.accordionButton').mouseover(function() {
$(this).addClass('over');

//ON MOUSEOUT REMOVE THE OVER CLASS
}).mouseout(function() {
$(this).removeClass('over');
});

/*** END REMOVE IF MOUSEOVER IS NOT REQUIRED ***/


/**************************************************************************************************** ****************
CLOSES ALL S ON PAGE LOAD
**************************************************************************************************** ****************/
$('.accordionContent').hide();

});

devonfarrell
09-22-2011, 02:29 PM
I tried making a defined height but no help.

And I've tried this:

<style type="text/css">

#accordion div { display: none; }

</style>

Both not working.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum