aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2012-04-17 18:12:42 +0100
committerMatthew Somerville <matthew@mysociety.org>2012-04-17 18:12:42 +0100
commit0a7f56d9dc36f22659bf786d15c3d7c4b8f33366 (patch)
tree28038498e1adc02d0ed234bd1a02b30798f654ab /web
parent25913d52079b80a29bf2c569b2cc103e58b417ac (diff)
Don't hide bit of form if there's data in it.
Diffstat (limited to 'web')
-rw-r--r--web/cobrands/fixmystreet/fixmystreet.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js
index 54e725864..fe2d1a496 100644
--- a/web/cobrands/fixmystreet/fixmystreet.js
+++ b/web/cobrands/fixmystreet/fixmystreet.js
@@ -230,10 +230,15 @@ $(function(){
/*
* Show stuff on input focus
*/
- $('.form-focus-hidden').hide();
- $('.form-focus-trigger').on('focus', function(){
- $('.form-focus-hidden').fadeIn(500);
- });
+ var form_focus_data = $('.form-focus-trigger').map(function() {
+ return $(this).val();
+ }).get().join('');
+ if (!form_focus_data) {
+ $('.form-focus-hidden').hide();
+ $('.form-focus-trigger').on('focus', function(){
+ $('.form-focus-hidden').fadeIn(500);
+ });
+ }
/*
* Show on click - pretty generic