so I have a jQuery accordion menu that I want to implement to my wordpress homepage, the problem is everytime I put the menu there, it extends my page way down like 1200 px height, and it`s the only one that does this.
How can I stop it from declaring that height and let me make it exactly how long the menu is extending, or even better go once with it. Again, I am talking about a wordpress plugin.
The theme I want to implement the menu in is : http://themeforest.net/item/celta-business-modern-corporate-wordpress-theme/full_screen_preview/218824?ref=lvraa
Left column
First you should try to set autoHeight to false , this will fix the height problem.
Then I could find the problem regarding HTML lists, I grabbed your HTML, put it locally and used the demo source for jQuery UI accordion (the section 3 have some HTML list inside) and it seems to work fine.
Hope it will Help 🙂
We all need your code to see the actual problem. You can jsfiddle it.
Also, try making the
autoHeight
tofalse
.$(".yourselector" ).accordion({ autoHeight: false });
When you initialize the accordion, include
autoHeight: false
in the options. It will then use the native heights specified in each div.It is impossible to give you a sure answer without knowing which accordion plugin you are using. It would have been very helpful for you to give a URL that showcases your issue.
If you are using the jQuery UI Accordion, you can try:
false
.If you are using another library or if you developed the accordion functionality yourself, please tell us what library you are using and share your code with us.
You need to change
autoHeight
tofalse
. Doing so may reduce the quality of animation, but should fix the height issue.It is caused by the accordion taking the height of the largest div. Lots more about it here:
http://docs.jquery.com/UI/Accordion#option-autoHeight
$( ".selector" ).accordion({ autoHeight: false });
To overcome this issue, You must set two properties as below :-
and
Refer the – official jQuery accordion documentation