aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2012-03-10 00:31:01 +0000
committerMatthew Somerville <matthew@mysociety.org>2012-03-10 01:04:24 +0000
commit8418a9014b4b9234ad26ae0b7d9c1d60cacd3fb5 (patch)
treed0cddb0285c416b251292ea2d6c84eedbdfce113
parentac385219bed1f3e5e41227b7e415b1b14d0b1c0d (diff)
Fix drawers mostly in IE6, and turn off absolute positioning when drawer finishes as otherwise middle media query goes all wrong due to container 100% width.
-rw-r--r--web/cobrands/fixmystreet/fixmystreet.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js
index df87e6e8e..c487ec227 100644
--- a/web/cobrands/fixmystreet/fixmystreet.js
+++ b/web/cobrands/fixmystreet/fixmystreet.js
@@ -415,6 +415,7 @@ $.fn.drawer = function(id, ajax) {
position: 'absolute',
zIndex: '1100',
marginTop: 0,
+ left: 0,
top: $(window).height() - $content.offset().top
}).removeClass('hidden-js').find('h2').css({ marginTop: 0 });
$this.data('setup', true);
@@ -423,18 +424,20 @@ $.fn.drawer = function(id, ajax) {
//do the animation
$('.shadow-wrap').prependTo(d).addClass('static');
d.show().animate({top:'3em'}, 1000, function(){
- $content.fadeOut();
+ $content.fadeOut(function() {
+ d.css({ position: 'relative' });
+ });
});
}, function(e){
var $this = $(this), d = $('#' + id), $sw = $('.shadow-wrap'),
$content = $('.content[role="main"]'),
tot_height = $(window).height() - d.offset().top;
$this.removeClass('hover');
- $content.show();
- d.animate({ top: tot_height }, 1000, function(){
+ d.css({ position: 'absolute' }).animate({ top: tot_height }, 1000, function(){
d.hide();
$sw.appendTo($content).removeClass('static');
});
+ $content.show();
});
};