summaryrefslogtreecommitdiff
path: root/web/scripts/growth.js
diff options
context:
space:
mode:
authorJesse Morgan <jesse@jesterpm.net>2013-06-03 17:53:53 -0700
committerJesse Morgan <jesse@jesterpm.net>2013-06-03 17:53:53 -0700
commit2689b2e69e77677522bc75cb7d790bc30ff644ab (patch)
tree736fba7d0d168d81e805b22c5d48105cb980e156 /web/scripts/growth.js
parent39d697b619c5b836da38d3ae457fee8999055c45 (diff)
Adding Initial Survey Templates
Adding the base survey template and the image and text question types. Moved the hero section to the index.html template to make common-page more common. Also adding jquery and some initial grow.js code.
Diffstat (limited to 'web/scripts/growth.js')
-rw-r--r--web/scripts/growth.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/web/scripts/growth.js b/web/scripts/growth.js
new file mode 100644
index 0000000..c4091ed
--- /dev/null
+++ b/web/scripts/growth.js
@@ -0,0 +1,23 @@
+function notice(msg)
+{
+ alert(msg);
+}
+
+function selectAnswer(element)
+{
+ $(element).siblings('.selected').removeClass('selected');
+ $(element).addClass('selected');
+ $("#answerField").val(element.id);
+}
+
+function nextQuestion()
+{
+ var selectedAnswer = $("#answerField").val();
+
+ if (selectedAnswer == '') {
+ notice('Please select an answer before moving to the next question');
+ return;
+ }
+
+ $("#questionForm").submit();
+}