How to enable the submit button in my HTML form and disable if checkbox was unchecked?
What is wrong with this code?
EnableSubmit = function(val)
{
First if condition checks whether toggle is switched to desired side. Condition can be changed according to requirement. Last jquery is to make toggle button grey.
if(!$('#togglehk').is(":checked"))
{
$('#togglehk').click();
}
jQuery('#togglehk').attr("disabled", true);
jQuery('#togglehk').prop("disabled",true);
jQuery('#togglehk').next(".slider").css("backgroundcolor","#B3B3B3");