From 25f5c2d48a0e6972225a897313ce29ded2e9f49d Mon Sep 17 00:00:00 2001 From: Gary Anderson Date: Wed, 26 Sep 2012 20:19:05 -0700 Subject: [PATCH] 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/ --- utils/answer-types.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/answer-types.js b/utils/answer-types.js index 9470915a6..fb492d1a8 100644 --- a/utils/answer-types.js +++ b/utils/answer-types.js @@ -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