From 6cb527a9375fa1697470cc11d2ba6ccf1acae886 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 22 Dec 2016 14:55:05 +0100 Subject: a cleaner way to work around browser bugs --- view/theme/redbasic/js/redbasic.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/view/theme/redbasic/js/redbasic.js b/view/theme/redbasic/js/redbasic.js index 5691a40d0..f97467947 100644 --- a/view/theme/redbasic/js/redbasic.js +++ b/view/theme/redbasic/js/redbasic.js @@ -14,7 +14,6 @@ $(document).ready(function() { } }); } - $('#css3-calc').remove(); // Remove the test element $('#left_aside_wrapper').stick_in_parent({ @@ -96,15 +95,13 @@ function toggleAside() { if($('main').hasClass('region_1-on')){ $('main').removeClass('region_1-on') $('#overlay').remove(); + $('#left_aside_wrapper').trigger("sticky_kit:detach"); } else { $('main').addClass('region_1-on') $('
').appendTo('section'); + $('#left_aside_wrapper').stick_in_parent({ + offset_top: $('nav').outerHeight(true) + }); } - - $(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); } -- cgit v1.2.3