From b8370cffb9a9f69ad87d489df6b73d7daa5434c0 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 16 Dec 2016 16:14:01 +0100 Subject: move the sticky-kit^Cquery plugin to /lib and see if we want this for the whole app --- view/theme/redbasic/js/redbasic.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'view/theme/redbasic') diff --git a/view/theme/redbasic/js/redbasic.js b/view/theme/redbasic/js/redbasic.js index c5f74db3f..c3c2c7e3f 100644 --- a/view/theme/redbasic/js/redbasic.js +++ b/view/theme/redbasic/js/redbasic.js @@ -16,6 +16,23 @@ $(document).ready(function() { } $('#css3-calc').remove(); // Remove the test element + if($(window).outerWidth() > 767) { + $('#left_aside_wrapper').stick_in_parent({ + offset_top: $('nav').outerHeight(true) + }); + } + + $(window).resize(function() { + if($(window).outerWidth() > 767) { + $('#left_aside_wrapper').stick_in_parent({ + offset_top: $('nav').outerHeight(true) + }); + } + else { + $('#left_aside_wrapper').trigger("sticky_kit:detach"); + } + }); + $('#expand-aside').click(function() { $('#expand-aside-icon').toggleClass('fa-arrow-circle-right').toggleClass('fa-arrow-circle-left'); $('main').toggleClass('region_1-on'); -- cgit v1.2.3