diff --git a/static/js/topic.js b/static/js/topic.js
index b74440e..4b33a33 100644
--- a/static/js/topic.js
+++ b/static/js/topic.js
@@ -71,6 +71,23 @@ function new_question(type, question, tries, progress) {
$('#topic_progress').css('width', (100*progress)+'%').attr('aria-valuenow', 100*progress);
MathJax.Hub.Queue(["Typeset",MathJax.Hub,"question_div"]);
+ if (type == "radio") {
+ $(".list-group-item").click(function () {
+ var index = $(this).index();
+ $("div.list-group input:radio").eq(index).prop("checked", true);
+
+ // $('a.list-group-item-primary').removeClass('list-group-item-primary');
+ // $(this).addClass('list-group-item-primary');
+ });
+ }
+ else if (type == "checkbox") {
+ $(".list-group-item").click(function () {
+ var index = $(this).index();
+ $("div.list-group input:checkbox").eq(index).trigger("click");
+ });
+ }
+
+
// enable shift+enter to submit
$("input:text, input:radio, input:checkbox").keydown(function (e) {
if (e.keyCode == 13) {
diff --git a/templates/question-checkbox.html b/templates/question-checkbox.html
index 0be69f3..6940b9d 100644
--- a/templates/question-checkbox.html
+++ b/templates/question-checkbox.html
@@ -7,7 +7,8 @@
{% for n,opt in enumerate(question['options']) %}
-
+
diff --git a/templates/question-radio.html b/templates/question-radio.html
index 3a8e0c3..12c19f6 100644
--- a/templates/question-radio.html
+++ b/templates/question-radio.html
@@ -7,7 +7,8 @@
{% for n,opt in enumerate(question['options']) %}
-
+
--
libgit2 0.21.2