$(".cb-checkbox").change(function() {
// Old way - before discovered bootstrap has this built in
//$("label[for='"+$(this).attr("id")+"']").toggleClass("selected-button");
$("label[for='"+$(this).attr("id")+"']").button('toggle');
$("#test-if-checked").hide();
if(this.checked) {
$("#test-if-checked").show();
}
});
//first attempt at doing the below in jquery - seems to work. Do we need to remove event listener?
$(document).on('touchstart', function(){
$("label").addClass("no-hover");
});
// stolen from tutorial and modified
//document.addEventListener('touchstart', function addtouchclass(e){ // first time user touches the screen
// document.getElementsByTagName('label').classList.add('no-hover');// add "no-hover" class to all labels using classList API
// document.removeEventListener('touchstart', addtouchclass, false) // de-register touchstart event
//}, false);