From 586e997fae3f7c262e3098a0c82b531f745db5ee Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Sat, 22 Feb 2014 12:48:15 -0800 Subject: Adding new question and answer question forms. --- web/scripts/growth.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'web/scripts/growth.js') diff --git a/web/scripts/growth.js b/web/scripts/growth.js index 8cd46b0..86ac21f 100644 --- a/web/scripts/growth.js +++ b/web/scripts/growth.js @@ -87,6 +87,24 @@ $(document).ready(function() video.removeAttribute("controls"); } + $('textarea').bind({ + focus: function () { + var self = $(this); + + if (self.val() == self.attr('defaultValue')) { + self.val('').removeClass('default'); + }; + }, + blur: function () { + var self = $(this), + val = jQuery.trim(self.val()); + + if (val == "" || val == self.attr('defaultValue')) { + self.val(self.attr('defaultValue')).addClass('default'); + }; + } + }).trigger('blur'); + $("#banner").slideDown(); }); @@ -281,3 +299,7 @@ function submitClassForm() return false; } + +function answerQuestion(id) { + $("#answer-" + id).slideDown(); +} -- cgit v1.2.3