These statements were automatically added by CoffeeScript. I'm only removing the obvious cases; there might be more cases where the `return` statement isn't necessary.
19 lines
374 B
JavaScript
19 lines
374 B
JavaScript
(function() {
|
|
"use strict";
|
|
App.CheckboxToggle = {
|
|
initialize: function() {
|
|
$("[data-checkbox-toggle]").on("change", function() {
|
|
var $target;
|
|
$target = $($(this).data("checkbox-toggle"));
|
|
|
|
if ($(this).is(":checked")) {
|
|
$target.show();
|
|
} else {
|
|
$target.hide();
|
|
}
|
|
});
|
|
}
|
|
};
|
|
|
|
}).call(this);
|