How to get the switch toggle state(true/false) in javascript?
How to get the switch toggle state(true/false) in javascript var switchStatus = false; $("#togBtn").on(‘change’, function() { if ($(this).is(‘:checked’)) { switchStatus = $(this).is(‘:checked’); alert(switchStatus);// To verify