more robust crossbrowser support
This commit is contained in:
parent
f2bfdfdedd
commit
2ce6d47519
@ -15,12 +15,14 @@ main {
|
|||||||
}
|
}
|
||||||
|
|
||||||
aside {
|
aside {
|
||||||
|
position: relative;
|
||||||
display: table-cell;
|
display: table-cell;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
padding: 71px 7px 0px 7px;
|
padding: 71px 7px 0px 7px;
|
||||||
}
|
}
|
||||||
|
|
||||||
section {
|
section {
|
||||||
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: table-cell;
|
display: table-cell;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
|
@ -23,7 +23,6 @@ body {
|
|||||||
margin: 0px;
|
margin: 0px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
aside {
|
aside {
|
||||||
@ -46,6 +45,16 @@ main {
|
|||||||
max-width: $main_widthpx;
|
max-width: $main_widthpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#overlay {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
cursor: pointer;
|
||||||
|
z-index: 1029;
|
||||||
|
}
|
||||||
|
|
||||||
h1, .h1 {
|
h1, .h1 {
|
||||||
font-size: 2em;
|
font-size: 2em;
|
||||||
}
|
}
|
||||||
|
@ -92,7 +92,19 @@ function makeFullScreen(full) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function toggleAside() {
|
function toggleAside() {
|
||||||
$(window).scroll();
|
|
||||||
$('#expand-aside-icon').toggleClass('fa-arrow-circle-right').toggleClass('fa-arrow-circle-left');
|
$('#expand-aside-icon').toggleClass('fa-arrow-circle-right').toggleClass('fa-arrow-circle-left');
|
||||||
$('main').toggleClass('region_1-on');
|
if($('main').hasClass('region_1-on')){
|
||||||
|
$('main').removeClass('region_1-on')
|
||||||
|
$('#overlay').remove();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$('main').addClass('region_1-on')
|
||||||
|
$('<div id="overlay"></div>').appendTo('section');
|
||||||
|
}
|
||||||
|
|
||||||
|
$(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