This commit is contained in:
parent
b9cf2f3433
commit
06a382af59
@ -33,6 +33,12 @@ $(document).ready(function () {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('section').on('click', function () {
|
||||||
|
if ($('main').hasClass('region_3-on')) {
|
||||||
|
toggleBside();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
var left_aside_height = $('#left_aside_wrapper').height();
|
var left_aside_height = $('#left_aside_wrapper').height();
|
||||||
|
|
||||||
$('#left_aside_wrapper').on('click', function () {
|
$('#left_aside_wrapper').on('click', function () {
|
||||||
@ -127,3 +133,24 @@ function toggleAside() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function toggleBside() {
|
||||||
|
if ($('main').hasClass('region_3-on')) {
|
||||||
|
$('html, body').css('overflow-x', '');
|
||||||
|
$('main').removeClass('region_3-on')
|
||||||
|
$('region_3').addClass('d-none')
|
||||||
|
$('#overlay').remove();
|
||||||
|
$('#right_aside_wrapper').trigger("sticky_kit:detach");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$('html, body').css('overflow-x', 'hidden');
|
||||||
|
$('main').addClass('region_3-on')
|
||||||
|
$('region_3').removeClass('d-none')
|
||||||
|
$('<div id="overlay"></div>').appendTo('section');
|
||||||
|
$('#right_aside_wrapper').stick_in_parent({
|
||||||
|
offset_top: $('nav').outerHeight(true) + 10,
|
||||||
|
parent: '#region_3',
|
||||||
|
spacer: '#right_aside_spacer'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
@ -5,24 +5,7 @@
|
|||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
notifications_parent = $('#notifications_wrapper')[0].parentElement.id;
|
notifications_parent = $('#notifications_wrapper')[0].parentElement.id;
|
||||||
$('.notifications-btn').click(function() {
|
$('.notifications-btn').click(function() {
|
||||||
|
toggleBside();
|
||||||
$('#notifications-btn-1');
|
|
||||||
if ($('main').hasClass('region_3-on')) {
|
|
||||||
$('html, body').css('overflow-x', '');
|
|
||||||
$('main').removeClass('region_3-on')
|
|
||||||
$('#overlay').remove();
|
|
||||||
$('#right_aside_wrapper').trigger("sticky_kit:detach");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$('html, body').css('overflow-x', 'hidden');
|
|
||||||
$('main').addClass('region_3-on')
|
|
||||||
$('<div id="overlay"></div>').appendTo('section');
|
|
||||||
$('#right_aside_wrapper').stick_in_parent({
|
|
||||||
offset_top: $('nav').outerHeight(true) + 10,
|
|
||||||
parent: '#region_3',
|
|
||||||
spacer: '#right_aside_spacer'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
window.onpopstate = function(e) {
|
window.onpopstate = function(e) {
|
||||||
|
Reference in New Issue
Block a user