Collapse-Pro-Matic Setall Expand/Collapse Toggle

This is an example of the expand all/collapse all trigger using the setall trigclass:
[expand title="Expand All" swaptitle="Collapse All" trigclass="setall"/] [expand title="expand 1"]this is the first expand item[/expand] [expand title="expand 2"]this is the second expand item[/expand]

Expand All
expand 1
this is the first expand item
expand 2
this is the second expand item
expand 3
this is the third expand item
expand 4
this is the forth expand item

Now, what if all items where expanded one by one… then we would want the setall trigger to know this and auto switch to the collapse all function. To do this we would need to associate them to the same group using the rel grouping attribute:

[expand title="Expand All" swaptitle="Collapse All" trigclass="setall" rel="my_group"/] [expand title="expand 1" rel="my_group"]this is the first expand item[/expand] [expand title="expand 2" rel="my_group"]this is the second expand item[/expand]

Expand All
expand 1
this is the first expand item
expand 2
this is the second expand item
expand 3
this is the third expand item
expand 4
this is the forth expand item

Testing Continues Here and also on this post

Leave a Reply

Your email address will not be published. Required fields are marked *