Skip to content
This repository has been archived by the owner on May 11, 2021. It is now read-only.

Commit

Permalink
jQuery .data() expects just a key when retrieving values.
Browse files Browse the repository at this point in the history
The existing code breaks some exercises (like function_1 and many more)
when using a version of jQuery greater than 1.7.1.

See http://api.jquery.com/data/
  • Loading branch information
Gary Anderson committed Sep 27, 2012
1 parent 7426e27 commit 25f5c2d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions utils/answer-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ $.extend(Khan.answerTypes, {
guess = [];

solutionarea.find(".sol").each(function() {
var validator = $(this).data("validator", validator);
var validator = $(this).data("validator");

if (validator != null) {
// Don't short-circuit so we can record all guesses
Expand Down Expand Up @@ -541,7 +541,7 @@ $.extend(Khan.answerTypes, {
guess = $.extend(true, [], guess);

solutionarea.find(".sol").each(function() {
var validator = $(this).data("validator", validator);
var validator = $(this).data("validator");

if (validator != null) {
// Shift regardless of whether we can show the guess
Expand All @@ -558,7 +558,7 @@ $.extend(Khan.answerTypes, {
guess = $.extend(true, [], guess);

solutionarea.find(".sol").each(function() {
var validator = $(this).data("validator", validator);
var validator = $(this).data("validator");

if (validator != null) {
// Shift regardless of whether we can show the interactive guess
Expand Down

0 comments on commit 25f5c2d

Please sign in to comment.