Skip to content
Snippets Groups Projects
Commit 97f2e5d5 authored by Rémi Emonet's avatar Rémi Emonet
Browse files

Use two different icons for expand/collapse

parent bc2ee317
Branches
Tags
No related merge requests found
......@@ -8,13 +8,13 @@ $(".challenge,.solution").click(function(event) {
|| $(event.target).filter(".fold-unfold").size() > 0;
if (trigger) {
$(">*:not(h2)", this).toggle(400);
$(">h2>span.fold-unfold", this).toggleClass("glyphicon-collapse-down glyphicon-collapse-up");
}
});
$(".challenge,.solution").each(function() {
$(">*:not(h2)", this).toggle();
var h2 = $("h2:first", this);
h2.append("<span class='fold-unfold glyphicon glyphicon-expand'></span>");
h2.append("<span class='fold-unfold glyphicon glyphicon-collapse-down'></span>");
});
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment