How to create a toggle button

Hi

I want to share how to create a toggle button because I was searching on internet and in this forum but there is not a good answer about it.

You can create with simple CSS.

Step 1

Install the plugin Classify

Step 2
Add a checkbox without text

Step 3
Add a class to the checkbox element: {addClass: “cm-toggle”}

Step 4
Using the CSS of this page:

And with some little modifications you can have the same results

Step 5
Add an HTML element and Copy and paste this CSS code:

3 Likes