diff options
author | Matthew Somerville <matthew@mysociety.org> | 2012-03-03 00:54:57 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2012-03-03 00:54:57 +0000 |
commit | 222f7acba38a17219de0bf190daece52ccf54d8c (patch) | |
tree | adae0a8f58f1df44403305a1629bb223b43e641a | |
parent | d981a13e902066d9ffdf3cbdc4bd6b1f9e313d4a (diff) |
Fix bug on Android due to caching variable too early.
-rw-r--r-- | web/cobrands/fixmystreet/fixmystreet.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js index 3f8fb4f4e..2e5ef2594 100644 --- a/web/cobrands/fixmystreet/fixmystreet.js +++ b/web/cobrands/fixmystreet/fixmystreet.js @@ -75,8 +75,7 @@ function tabs(elem) $(function(){ - var $html = $('html'), - $map_box = $('#map_box'); + var $html = $('html'); $html.removeClass('no-js').addClass('js'); @@ -86,11 +85,11 @@ $(function(){ //add mobile class if small screen if (Modernizr.mq('only screen and (max-width:47.9375em)')) { $html.addClass('mobile'); - $map_box.css({ height: '10em' }); + $('#map_box').css({ height: '10em' }); if (typeof fixmystreet !== 'undefined' && fixmystreet.page == 'around') { // Immediately go full screen map if on around page $('#site-header').hide(); - $map_box.prependTo('.wrapper').css({ + $('#map_box').prependTo('.wrapper').css({ position: 'absolute', top: 0, left: 0, right: 0, bottom: 0, height: 'auto', @@ -111,7 +110,7 @@ $(function(){ map_pos = 'absolute'; map_height = $(window).height(); } - $map_box.prependTo('.wrapper').css({ + $('#map_box').prependTo('.wrapper').css({ zIndex: 0, position: map_pos, top: 0, left: 0, right: 0, bottom: 0, width: '100%', height: map_height, |