aboutsummaryrefslogtreecommitdiff
path: root/ratatoeskr/js/backend.js
blob: cb276b1454fb9df92aedb10ff812d1e68bf1ffcb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
$(function() {
    $("div.articleeditor-metabar-element h2").addClass("metabar_element_expanded").on("click", function() {
        var self = $(this);
        if (self.hasClass("metabar_element_expanded")) {
            self.removeClass("metabar_element_expanded");
            self.addClass("metabar_element_collapsed");
            $("div.articleeditor-metabar-element-content", self.parent()).hide("fast");
        } else {
            self.removeClass("metabar_element_collapsed");
            self.addClass("metabar_element_expanded");
            $("div.articleeditor-metabar-element-content", self.parent()).show("fast");
        }
    });
});