Skip to content

Commit 3001ab5

Browse files
assets/js/lesson.js: use .length instead of .size()
.size() was deprecated in jQuery 3.0 in favor of .length attribute. https://jquery.com/upgrade-guide/3.0/#breaking-change-deprecated-size-removed Co-Authored-By: Thomas Green <[email protected]>
1 parent 5d4aaa2 commit 3001ab5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

assets/js/lesson.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ $("table").addClass("table table-striped");
44

55
// Handle foldable challenges and solutions (on click and at start).
66
$(".solution").click(function(event) {
7-
var trigger = $(event.target).has(".fold-unfold").size() > 0
8-
|| $(event.target).filter(".fold-unfold").size() > 0;
7+
var trigger = $(event.target).has(".fold-unfold").length > 0
8+
|| $(event.target).filter(".fold-unfold").length > 0;
99
if (trigger) {
1010
$(">*:not(h2)", this).toggle(400);
1111
$(">h2>span.fold-unfold", this).toggleClass("glyphicon-collapse-down glyphicon-collapse-up");

0 commit comments

Comments
 (0)