aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2012-03-14 19:29:21 +0000
committerMatthew Somerville <matthew@mysociety.org>2012-03-14 19:29:21 +0000
commit491d21469a34b028c00eed7a0f26ff7f3725dcb0 (patch)
treee8f3ca45c7b16b19ece8536c90a0835ffc89c998 /web
parentac16217427341e63a90caaf9e3c13fe1a2e16b72 (diff)
On mobile, make Report a problem a link that scrolls up to the form.
Diffstat (limited to 'web')
-rw-r--r--web/cobrands/fixmystreet/base.scss2
-rw-r--r--web/cobrands/fixmystreet/fixmystreet.js6
2 files changed, 7 insertions, 1 deletions
diff --git a/web/cobrands/fixmystreet/base.scss b/web/cobrands/fixmystreet/base.scss
index 97755d8d5..bda29f2cb 100644
--- a/web/cobrands/fixmystreet/base.scss
+++ b/web/cobrands/fixmystreet/base.scss
@@ -512,7 +512,7 @@ p.label-valid {
font-size: 1.25em;
border-bottom: 0.25em solid #333;
}
- a:hover{
+ a:hover, span.hover {
background: #333;
color:#fff;
text-decoration: none;
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js
index c2801c880..0db8334fb 100644
--- a/web/cobrands/fixmystreet/fixmystreet.js
+++ b/web/cobrands/fixmystreet/fixmystreet.js
@@ -120,6 +120,11 @@ $(function(){
.text('Place pin on map')
.prepend('<a href="/">home</a>');
}
+ $('span.report-a-problem-btn').on('click.reportBtn', function(){
+ $('html, body').animate({scrollTop:0}, 500);
+ }).css({ cursor:'pointer' }).on('hover.reportBtn', function(){
+ $(this).toggleClass('hover');
+ });
} else {
// Make map full screen on non-mobile sizes.
$html.removeClass('mobile');
@@ -146,6 +151,7 @@ $(function(){
.prependTo('#side')
.text('Click map to report a problem');
}
+ $('span.report-a-problem-btn').css({ cursor:'' }).off('.reportBtn');
}
last_type = type;
});