Gazelle/static/functions/forum_search.js
2013-05-21 08:01:09 +00:00

12 lines
351 B
JavaScript

(function ($) {
$(document).ready(function() {
$(".forum_category").click(function(e) {
var id = this.id;
var isChecked = $(this).text() != "Check all";
isChecked ? $(this).text("Check all") : $(this).text("Uncheck all");
$("input[data-category='" + id + "']").attr("checked", !isChecked);
e.preventDefault();
});
});
}(jQuery));