move the sticky-kit^Cquery plugin to /lib and see if we want this for the whole app

This commit is contained in:
Mario Vavti
2016-12-16 16:14:01 +01:00
parent 5252211c92
commit 6bde70d60a
7 changed files with 297 additions and 290 deletions

View File

@@ -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');