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

Making challenges foldable

parent e17b8ca3
Branches
Tags
No related merge requests found
......@@ -136,3 +136,10 @@ ul,
ol {
padding-left: 1em;
}
span.fold-unfold {
margin-left: 1em;
font-size: 95%;
opacity: 0.5;
}
// Make all tables striped by default.
$("table").addClass("table table-striped");
// Handle foldable challenges (on click and at start)
$(".challenge").click(function(event) {
$(">*:not(h2)", this).toggle(400);
});
$(".challenge").each(function() {
$(">*:not(h2)", this).toggle();
var h2 = $("h2:first", this);
h2.append("<span class='fold-unfold'>(click to fold/unfold)</span>");
});
// Handle searches.
// Relies on document having 'meta' element with name 'search-domain'.
function google_search() {
......
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