mirror of
https://github.com/friendica/friendica
synced 2025-01-11 09:24:44 +00:00
Frio: Enable stiky aside only on desktop-size windows.
"Hack" to fix the "scroll back to top" problem with chrome-based browsers, sticky-kit and off-canvas aside
This commit is contained in:
parent
0afc732059
commit
0ffe426ff1
2 changed files with 12 additions and 13 deletions
|
@ -126,9 +126,6 @@ code {
|
||||||
aside.canvas-slid::before {
|
aside.canvas-slid::before {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
aside + div {
|
|
||||||
display:none!important;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -317,17 +317,19 @@ $(document).ready(function(){
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Sticky aside on page scroll
|
* Sticky aside on page scroll, only on desktop
|
||||||
*/
|
*/
|
||||||
$("aside").stick_in_parent({
|
if ($(window).width() > 976) {
|
||||||
offset_top: 100, // px, header + tab bar + spacing
|
$("aside").stick_in_parent({
|
||||||
recalc_every: 10
|
offset_top: 100, // px, header + tab bar + spacing
|
||||||
});
|
recalc_every: 10
|
||||||
// recalculate sticky aside on clicks.
|
});
|
||||||
// this handle height changes on expanding submenus
|
// recalculate sticky aside on clicks.
|
||||||
$("aside").on("click", function(){
|
// this handle height changes on expanding submenus
|
||||||
$(document.body).trigger("sticky_kit:recalc");
|
$("aside").on("click", function(){
|
||||||
});
|
$(document.body).trigger("sticky_kit:recalc");
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function openClose(theID) {
|
function openClose(theID) {
|
||||||
|
|
Loading…
Reference in a new issue