How to perform action for the checkbox?

Put a check - needs to play the stream, remove the check mark - the flow stops.
began sketching out code that does not leave
<input type="checkbox" name="qcID" id="qcID1" value="1">
<label for="qcID1">tick is singing - is singing</label>

<script src="http://code.jquery.com/jquery-latest.js"></script>
the <script>
$("input:checkbox").on("checked", function() {
 beep(); 
});
var beep = (function () {
 var snd = new Audio("http://music.test.ru:8000/play"); 
snd.play();
});
</script>
June 8th 19 at 17:26
1 answer
June 8th 19 at 17:28
Not "checked" and "change"
Yes)
but as when removing a tick to plug it? - Nedra3 commented on June 8th 19 at 17:31
the change event occurs and set and when removing. - Austen.Thompson53 commented on June 8th 19 at 17:34
I noticed)
How to make prompt, pliz - Nedra3 commented on June 8th 19 at 17:37
, https://jsfiddle.net/uv81rLwc/ - Austen.Thompson53 commented on June 8th 19 at 17:40

Find more questions by tags jQueryJavaScript