aboutsummaryrefslogtreecommitdiff
path: root/ratatoeskr/js
diff options
context:
space:
mode:
Diffstat (limited to 'ratatoeskr/js')
-rw-r--r--ratatoeskr/js/backend.js15
1 files changed, 5 insertions, 10 deletions
diff --git a/ratatoeskr/js/backend.js b/ratatoeskr/js/backend.js
index 8b60c2d..cb276b1 100644
--- a/ratatoeskr/js/backend.js
+++ b/ratatoeskr/js/backend.js
@@ -1,16 +1,11 @@
-$(function()
-{
- $("div.articleeditor-metabar-element h2").addClass("metabar_element_expanded").click(function()
- {
- self = $(this);
- if(self.hasClass("metabar_element_expanded"))
- {
+$(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
- {
+ } else {
self.removeClass("metabar_element_collapsed");
self.addClass("metabar_element_expanded");
$("div.articleeditor-metabar-element-content", self.parent()).show("fast");