<?php if($dayt == '1'){ }?>
</td>
<td>
<center>
<input type="checkbox" class="colour-button cbb" name="v1" value="10 - 12" id="btn1012" /><label for="btn1012"> <i class="fa fa-check-circle hide12" id="chk-btn1012"></i> <?php echo $dayt?></label>
<input type="checkbox" class="colour-button cbb" name="v1" value="10 - 12" id="btn1214" /><label for="btn1214" class="labe"><i class="fa fa-check-circle hide12" id="chk-btn1214"></i> <?php echo $row3[10]?></label>
</center>
</td>
<td>
<?php }?>
</td>
<td>
<center>
<input type="checkbox" class="colour-button cbb22" name="v2" value="10 - 12" id="btn10" /><label for="btn10"><i class="fa fa-check-circle hide13" id="chk-btn10"></i> 10am - 12pm</label>
<input type="checkbox" class="colour-button cbb22" name="v2" value="10 - 12" id="btn12" /><label for="btn12" class="labe"><i class="fa fa-check-circle hide13" id="chk-btn12"></i> 5pm - 7pm</label>
</center>
<script>
$(function() {
$(".colour-button").click(enable_cb);
});
function enable_cb() {
if (this.checked) {
//this will mean at least one is always checked
$("input.colour-button1").prop("disabled", false);
$("#chk-" + this.id).show();
}
else {
//in this case, hide the element if you need to, but check for ANY items
//$("input.colour-button1").attr("disabled", true);
$("#chk-" + this.id).hide();
if ($(".colour-button:checked").length == 0) {
$("input.colour-button1").attr("disabled", true).prop("checked", false);
$('.hide11').hide();
$('#submit').attr('disabled', true).removeClass('orangeBtn23').addClass('disabled'); //disable input
}
}
}
</script>
While($row= mysqli_query_rows($result)){
//MY CODE SHOWN ABOVE
}
Experts Exchange (EE) has become my company's go-to resource to get answers. I've used EE to make decisions, solve problems and even save customers. OutagesIO has been a challenging project and... Keep reading >>
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Most Valuable Expert award recognizes technology experts who passionately share their knowledge with the community, demonstrate the core values of this platform, and go the extra mile in all aspects of their contributions. This award is based off of nominations by EE users and experts. Multiple MVEs may be awarded each year.
This award recognizes an author who contributes the highest volume of original works or content. Recipients of this award produce extremely valuable content that prioritizes accuracy, relevancy, and professionalism.