There are a couple of ways a button can be used as a collapse-o-matic trigger:
using a stylized div
this is the hidden content
shortcode:
[expand title="Push me" trigclass="noarrow my_button" targclass="my_content" tag="div"]this is the hidden content[/expand]
css:
.my_button {
background: #4B55E3;
color: white;
padding: 5px;
width: 130px;
text-align: center;
}
.my_button.colomat-hover{
background: #999;
text-decoration: none;
}
.my_content{
margin-left: 0;
}
Using a html button:
shortcode:
[expand title="Push me" trigclass="noarrow my_button" targclass="my_content" tag="button"]this is the hidden content[/expand]
this is the hidden content
Hi. Do you think this could be done with a small thumbnail image instead of a button?
Hi there,
Is there a way to make the “button” disappear once it has been clicked? When I use the swaptitle attribute, the text is hidden, but the background color etc. remains.
Thank you!
Hello, good question. We’ll answer it on the WordPress Forums on this thread.
The html button breaks the expand/collapse behavior when you use RETURN. Is there a solution for that? I have the same problem with my use of collapse-o-matic.
Not sure exactly what you mean, but we are happy to help you if you open a support ticket on the WordPress Support Forum at: https://wordpress.org/support/plugin/jquery-collapse-o-matic