a cleaner way to work around browser bugs
This commit is contained in:
parent
007ba2bee4
commit
a7a3ce7245
@ -14,7 +14,6 @@ $(document).ready(function() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#css3-calc').remove(); // Remove the test element
|
$('#css3-calc').remove(); // Remove the test element
|
||||||
|
|
||||||
$('#left_aside_wrapper').stick_in_parent({
|
$('#left_aside_wrapper').stick_in_parent({
|
||||||
@ -96,15 +95,13 @@ function toggleAside() {
|
|||||||
if($('main').hasClass('region_1-on')){
|
if($('main').hasClass('region_1-on')){
|
||||||
$('main').removeClass('region_1-on')
|
$('main').removeClass('region_1-on')
|
||||||
$('#overlay').remove();
|
$('#overlay').remove();
|
||||||
|
$('#left_aside_wrapper').trigger("sticky_kit:detach");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$('main').addClass('region_1-on')
|
$('main').addClass('region_1-on')
|
||||||
$('<div id="overlay"></div>').appendTo('section');
|
$('<div id="overlay"></div>').appendTo('section');
|
||||||
|
$('#left_aside_wrapper').stick_in_parent({
|
||||||
|
offset_top: $('nav').outerHeight(true)
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$(window).scroll();
|
|
||||||
// work around a bug where a browser seems to not trigger scroll with $(window).scroll()
|
|
||||||
var scrollpos = $(window).scrollTop();
|
|
||||||
$(window).scrollTop(scrollpos - 1);
|
|
||||||
setTimeout(function(){ $(window).scrollTop(scrollpos) }, 100);
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user