View Full Version : Collapsing an element in vBulletin, but displaying element in collapsed state first
sparklywater
01-11-2009, 06:05 PM
By default, a collapsible element shows up in the uncollapsed / open state first, and then the collapse button needs to be clicked before it is collapsed. However I need this to be reversed such that the block is already collapsed when the page is first viewed, but can be opened by clicking on the collapse control / button.
How can I do this?
Bellardia
01-11-2009, 06:41 PM
hook : global_start
$vbcollapse['collapseimg_[OBJECT_NAME]'] = '_collapsed';
$vbcollapse['collapseobj_[OBJECT NAME]'] = 'display:none;';
sparklywater
01-11-2009, 09:08 PM
thanks, I'll give that a try :)
Marco van Herwaarden
01-12-2009, 08:19 AM
Please be aware that users that have JS turned off, will never be able to expand. (which is also the reason default vB will never collapse by default)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.