diff options
author | Mario Vavti <mario@mariovavti.com> | 2017-01-03 17:56:40 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-01-03 17:56:40 +0100 |
commit | 07b299abd2c5ed153d5b443a90018892e9aa0f5b (patch) | |
tree | 4a8b1a8a9896c5fa3786fbd83aca2b6f70494eb9 /view/theme/redbasic | |
parent | ae563e2b1cfdc0ade6cc7cf3843e8ba92f2e10bf (diff) | |
download | volse-hubzilla-07b299abd2c5ed153d5b443a90018892e9aa0f5b.tar.gz volse-hubzilla-07b299abd2c5ed153d5b443a90018892e9aa0f5b.tar.bz2 volse-hubzilla-07b299abd2c5ed153d5b443a90018892e9aa0f5b.zip |
trigger sticky_kit:recalc if the size of left_aside_wrapper changes
Diffstat (limited to 'view/theme/redbasic')
-rw-r--r-- | view/theme/redbasic/js/redbasic.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/view/theme/redbasic/js/redbasic.js b/view/theme/redbasic/js/redbasic.js index 395385411..185dc7bcd 100644 --- a/view/theme/redbasic/js/redbasic.js +++ b/view/theme/redbasic/js/redbasic.js @@ -30,6 +30,15 @@ $(document).ready(function() { } }); + var left_aside_height = $('#left_aside_wrapper').height(); + + $('#left_aside_wrapper').on('click', function() { + if(left_aside_height != $('#left_aside_wrapper').height()) { + $(document.body).trigger("sticky_kit:recalc"); + left_aside_height = $('#left_aside_wrapper').height(); + } + }); + if($('#left_aside_wrapper').length && $('#left_aside_wrapper').html().length === 0) { $('#expand-aside').hide(); } @@ -96,7 +105,7 @@ function toggleAside() { $('main').addClass('region_1-on') $('<div id="overlay"></div>').appendTo('section'); $('#left_aside_wrapper').stick_in_parent({ - offset_top: $('nav').outerHeight(true) + offset_top: $('nav').outerHeight(true) - 10 }); } } |