Hey there, I need some help with toggling the opening and closing of a div when clicking on a toggle switch.
$('.tog').on('click', function() {
$('.cntr').show();
});
.switch {
position: relative;
display: inline-block;
width: 90px;
height: 34px;
// Rest of the CSS code here...
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="tog">
<label class="switch">
<input type="checkbox" id="togBtn">
<div class="slider round">
<!--ADDED HTML --><span class="on">ON</span><span class="off">OFF</span><!--END-->
</div>
</label>
</div>
<div class="cntr">Donec sollicitudin molestie malesuada. Quisque velit nisi, pretium ut lacinia in, elementum id enim. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur arcu erat, accumsan id imperdiet et, porttitor at sem. Praesent sapien massa, convallis
a pellentesque nec, egestas non nisi. Vivamus suscipit tortor eget felis porttitor volutpat. Praesent sapien massa, convallis a pellentesque nec, egestas non nisi. Pellentesque in ipsum id orci porta dapibus. Praesent sapien massa, convallis a pellentesque
nec, egestas non nisi. Curabitur arcu erat, accumsan id imperdiet et, porttitor at sem.</div>