Restyle expandable blocks

This commit is contained in:
Toks
2013-12-23 13:22:25 -05:00
parent 9057d708ff
commit 52fd58087d
3 changed files with 12 additions and 16 deletions

View File

@@ -14,7 +14,13 @@
Danbooru.Dtext.initialize_expandables = function($parent) {
$parent.find(".expandable-content").hide();
$parent.find(".expandable-button").click(function(e) {
$(this).parent().next().fadeToggle("fast");
var button = $(this);
button.parent().next().fadeToggle("fast");
if (button.val() === "Show") {
button.val("Hide");
} else {
button.val("Show");
}
});
}