I am referring to the portlet example here
All the divs of the class 'portlet-content' are displayed when the demo starts. I am trying to get them to collapse when the page loads, and I tried this:
$('.portlet-content').toggle();
Inside the document.ready(). However this doesn't work.
However, if I enter the statement above using the Firebug console, it does work. Do I need to override some default event?
Edit: It seems that the toggle works; however, when the tab is selected, it seems that all the div inside it are also toggled. Is there anyway to prevent this behaviour?