diff options
author | Jesse Morgan <jesse@jesterpm.net> | 2014-02-22 12:48:15 -0800 |
---|---|---|
committer | Jesse Morgan <jesse@jesterpm.net> | 2014-02-22 12:48:15 -0800 |
commit | 586e997fae3f7c262e3098a0c82b531f745db5ee (patch) | |
tree | 831843308d13c493907e9be00504416bb699f7cf /web/scripts/growth.js | |
parent | a2a1d7a67b1458cc342c0eb8d5a2732c806ddacf (diff) |
Adding new question and answer question forms.
Diffstat (limited to 'web/scripts/growth.js')
-rw-r--r-- | web/scripts/growth.js | 22 |
1 files changed, 22 insertions, 0 deletions
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(); +} |