I’ve gone ahead and created a jquery accordion, when its opening it keeps jumping. I thought this may have been a margin/padding problem on the .content div but after removing it this didn’t appear to be the problem. I can’t see what else will be causing the problem.
I’ve gone ahead and uploaded this so you guys can take a look
http://sites.lukespoor.com/accordion/
I have taken a look at other threads and some said to apply
display:block;
to the li etc but this didn’t solve my problem 🙁
Any help is very appreciated.
While accordion animates things, it giving a
position:absoluteto thediv.contentfor a fraction of time, while calculating theheight.At this time the
div.contenttakes a width more than theli, ending at end of thebody. So theheightcalculated is wrong, This can be seen if you just tryabsolute positioningfor.content.The solution is to make the parent
liasrelative positioned, so even whendiv.contentis set toabsolutewhile calculatingheight, it takes thewidthof parentli, and you get the correctheight.