Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

made discussion sections also appear by default #439

Merged
merged 1 commit into from Apr 20, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions assets/js/lesson.js
Expand Up @@ -3,7 +3,7 @@ $("table").addClass("table table-striped");


// Handle foldable challenges and solutions (on click and at start).
$(".discussion,.solution").click(function(event) {
$(".solution").click(function(event) {
var trigger = $(event.target).has(".fold-unfold").size() > 0
|| $(event.target).filter(".fold-unfold").size() > 0;
if (trigger) {
Expand All @@ -12,7 +12,7 @@ $(".discussion,.solution").click(function(event) {
event.stopPropagation();
}
});
$(".discussion,.solution").each(function() {
$(".solution").each(function() {
$(">*:not(h2)", this).toggle();
var h2 = $("h2:first", this);
h2.append("<span class='fold-unfold glyphicon glyphicon-collapse-down'></span>");
Expand Down