function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
vikramkkvikramkk 

Collapse/Expand on Alternate Clicks

Hi

 

In a custom visual force page, there is a pageblock . I want to create a command button or link by clicking which the page block should expand and on clicking again it should collapse. Basically it should expand/collpase on alternate clicks and it should be in collpased state at the time of loading the page. I think it can be achieved using java script for onlick attribute of command link or button. Can some provide sample code to achieve this? (I know we can use collpasible attribute of pageblock  but I dont want to use it)

 

Thanks

LakshmanLakshman