summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/codeq/problem_list.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/js/codeq/problem_list.js b/js/codeq/problem_list.js
index 728f28c..9c19852 100644
--- a/js/codeq/problem_list.js
+++ b/js/codeq/problem_list.js
@@ -299,15 +299,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
var problems = languageData.refs,
groups = languageData.groups,
jqGroup = jqScreen.find('h2.group-title'),
- i;
+ i, ref, jqLink;
// show attempted/solved status in the link for each problem
for (i = 0; i < languageData.refs.length; i++) {
- var ref = languageData.refs[i];
+ ref = languageData.refs[i];
+ jqLink = jqScreen.find('a.problem-'+i);
+ jqLink.removeClass('attempted solved');
if (ref.id in attempts) {
- jqScreen.find('a.problem-'+i)
- .removeClass('solved attempted')
- .addClass(attempts[ref.id] ? 'solved' : 'attempted');
+ jqLink.addClass(attempts[ref.id] ? 'solved' : 'attempted');
}
}