diff options
author | zotlabs <mike@macgirvin.com> | 2017-01-06 12:24:26 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-01-06 12:24:26 -0800 |
commit | ba2d0fae0e339e4909a7ee11c8493cdffbc6c392 (patch) | |
tree | 7f796cc33c96c68039b034c78c26789cf3d8b75e /view/theme/redbasic/js/redbasic.js | |
parent | 1ce8168d72b4bcb8a4373a6a6a4428db62a4aa3f (diff) | |
parent | 7f9e91f1c78f9df6375a5ae5cb38b09eea02312b (diff) | |
download | volse-hubzilla-ba2d0fae0e339e4909a7ee11c8493cdffbc6c392.tar.gz volse-hubzilla-ba2d0fae0e339e4909a7ee11c8493cdffbc6c392.tar.bz2 volse-hubzilla-ba2d0fae0e339e4909a7ee11c8493cdffbc6c392.zip |
Merge branch 'dev' into gnusoc
Diffstat (limited to 'view/theme/redbasic/js/redbasic.js')
-rw-r--r-- | view/theme/redbasic/js/redbasic.js | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/view/theme/redbasic/js/redbasic.js b/view/theme/redbasic/js/redbasic.js index 395385411..3ff0c43ae 100644 --- a/view/theme/redbasic/js/redbasic.js +++ b/view/theme/redbasic/js/redbasic.js @@ -18,7 +18,9 @@ $(document).ready(function() { if($(window).width() > 767) { $('#left_aside_wrapper').stick_in_parent({ - offset_top: $('nav').outerHeight(true) + offset_top: $('nav').outerHeight(true), + parent: '#region_1', + spacer: '#left_aside_spacer' }); } @@ -30,6 +32,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 +107,9 @@ 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, + parent: '#region_1', + spacer: '#left_aside_spacer' }); } } |