I have the following code:
function toggleChecked(status) {
$(".checkbox").each( function() {
$(this).attr("checked",status);
})
}
I don't know how to change the each clause and anonymous function inside it.
toggleChecked = (status) ->
$(".checkbox").each ->
$(this).attr "checked", status
Note that you can use Js2coffee to convert JavaScript into CoffeeScript.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With