Files
nairobi/app/assets/javascripts/checkbox_toggle.js
Javi Martín d93a029ce5 Convert CofeeScript to JavaScript
Compiled using `coffee -c` with CoffeeScript 1.12.6.
2019-09-11 14:03:24 +02:00

19 lines
430 B
JavaScript

// Generated by CoffeeScript 1.12.6
(function() {
"use strict";
App.CheckboxToggle = {
initialize: function() {
return $("[data-checkbox-toggle]").on("change", function() {
var $target;
$target = $($(this).data("checkbox-toggle"));
if ($(this).is(":checked")) {
return $target.show();
} else {
return $target.hide();
}
});
}
};
}).call(this);