Permalink
Browse files

jQuery .data() expects just a key when retrieving values.

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...
1 parent 7426e27 commit 25f5c2d48a0e6972225a897313ce29ded2e9f49d Gary Anderson committed Sep 27, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 utils/answer-types.js
View
@@ -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
@@ -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
@@ -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

0 comments on commit 25f5c2d

Please sign in to comment.