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?
Use this Demo here
$("#getusb").on('change',function(){ if($('#getusb').prop('checked')== true){ $('.active-usb').text($("#getusb:checkbox:checked").val()); }else{ $('.active-usb').text(''); } }).change();