This is a simple plugin
it basicly takes a html select element and displays it as a "ipod-like" switch.
And as an extra, the switch can show/hide other elemens
<script src="https://code.jquery.com/jquery-3.4.1.min.js" type="text/javascript"></script>
<script src="js/canecode_switch.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="css/canecode_switch.css">
<input id="the_checkbox_id" type="checkbox" name="nobody_cares">
<input type="textarea" class="this_shows_when_switch_is_off" placeholder="Swhitch is OFF">
<input type="textarea" class="this_shows_when_switch_is_on" placeholder="Swhitch is ON">
<script>
var $ = jQuery;
$(function(){
canecode_switch("#the_checkbox_id",".this_shows_when_switch_is_off", ".this_shows_when_switch_is_on");
});
</script>