Toggle - change text on header when open/closed

2 replies · opened Feb 15, 2017

BbatempnetFeb 15, 2017

Hi I am using the toggle-border.
Is there a way to change the text aswell as the icon on the toggle header dependent on whether the toggle is open or closed
ie open icon "click to open" (when closed) replaced with:
close icon"click to close" (when open)

Many thanks
(ps still loving canvas it is incredibly flexible and fun/easy to work with)

SSemicolon WebSTAFFFeb 18, 2017

Hello,

Thank You so much for the Kind Words! :)

Yes this is Definitely Possible! Simply use the following CSS code:

.toggle .togglet:not(.toggleta) span.toggle-open,
.toggle .togglet.toggleta span.toggle-closed { display: none; }

.toggle .togglet.toggleta span.toggle-open,
.toggle .togglet:not(.toggleta) span.toggle-closed { display: block; }

and then use the following HTML Code for the Toggle:


	
		
		
		This is a Toggle Title
		Close this Toggle
	
	Lorem ipsum dolor sit amet, consectetur adipisicing elit. Assumenda, dolorum, vero ipsum molestiae minima odio quo voluptate illum excepturi quam cum voluptates doloribus quae nisi tempore necessitatibus dolores ducimus enim libero eaque explicabo suscipit animi at quaerat aliquid ex expedita perspiciatis? Saepe, aperiam, nam unde quas beatae vero vitae nulla.

This will definitely work fine. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

BbatempnetFeb 28, 2017

Hi - thats Just what I was after - thanks so much for the response. Much appreciated

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard