aboutsummaryrefslogtreecommitdiffstats
path: root/web/js
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2011-07-22 17:52:07 +0100
committerMatthew Somerville <matthew@mysociety.org>2011-07-22 17:52:07 +0100
commitb2209550b140a66b7f803cfcdb971dd91080ca30 (patch)
tree9d6e727b72660b2b2aa2c15f25785a0aceab6cb2 /web/js
parent2a64bd4aa8cc0b38c1c728ba84d0b06725691100 (diff)
Working placeholders for Southampton site.
Diffstat (limited to 'web/js')
-rw-r--r--web/js/southampton.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/web/js/southampton.js b/web/js/southampton.js
index da9552f05..1f3e16105 100644
--- a/web/js/southampton.js
+++ b/web/js/southampton.js
@@ -6,6 +6,21 @@
$(function(){
+ $('[placeholder]').focus(function(){
+ var input = $(this);
+ if (input.val() == input.attr('placeholder')) {
+ input.val('');
+ input.removeClass('placeholder');
+ input.css({ 'color': '#000000' });
+ }
+ }).blur(function(){
+ var input = $(this);
+ if (input.val() == '' || input.val() == input.attr('placeholder')) {
+ input.css({ 'color': '#999999' });
+ input.val(input.attr('placeholder'));
+ }
+ }).blur();
+
$('#form_category').change(function(){
var category = $(this).val();
if ('Potholes' == category) {