diff options
author | Mario Vavti <mario@mariovavti.com> | 2016-12-22 11:54:04 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2016-12-22 11:54:04 +0100 |
commit | 2ce6d47519e4f8d2b24c721a812c8826ac9c1c7a (patch) | |
tree | 945a215ac28bb9de5d2e74ae56cfe0fa84c7012d /view/theme/redbasic/js/redbasic.js | |
parent | f2bfdfdeddea86784ce2d17b3c35e46a1c582b79 (diff) | |
download | volse-hubzilla-2ce6d47519e4f8d2b24c721a812c8826ac9c1c7a.tar.gz volse-hubzilla-2ce6d47519e4f8d2b24c721a812c8826ac9c1c7a.tar.bz2 volse-hubzilla-2ce6d47519e4f8d2b24c721a812c8826ac9c1c7a.zip |
more robust crossbrowser support
Diffstat (limited to 'view/theme/redbasic/js/redbasic.js')
-rw-r--r-- | view/theme/redbasic/js/redbasic.js | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/view/theme/redbasic/js/redbasic.js b/view/theme/redbasic/js/redbasic.js index 4a18db8ff..5691a40d0 100644 --- a/view/theme/redbasic/js/redbasic.js +++ b/view/theme/redbasic/js/redbasic.js @@ -92,7 +92,19 @@ function makeFullScreen(full) { } function toggleAside() { - $(window).scroll(); $('#expand-aside-icon').toggleClass('fa-arrow-circle-right').toggleClass('fa-arrow-circle-left'); - $('main').toggleClass('region_1-on'); + if($('main').hasClass('region_1-on')){ + $('main').removeClass('region_1-on') + $('#overlay').remove(); + } + else { + $('main').addClass('region_1-on') + $('<div id="overlay"></div>').appendTo('section'); + } + + $(window).scroll(); + // work around a bug where a browser seems to not trigger scroll with $(window).scroll() + var scrollpos = $(window).scrollTop(); + $(window).scrollTop(scrollpos - 1); + setTimeout(function(){ $(window).scrollTop(scrollpos) }, 100); } |