I\'m using a jQuery function to get the value of an checked checkbox.
How to hide the value in the span class \"active-usb\" if the checkbox is not checked anymore?
You can check ckeckbox status:
$("#getusb").on("change", function() { //check if is checked if (this.checked) { //set the span text according to checkbox value $('.active-usb').text(this.value); } else { //if is not checked hide span $(".active-usb").hide(); } });