frio mobile: fix: right offcanvas
This commit is contained in:
parent
1a9bc9e444
commit
846506081c
3 changed files with 191 additions and 53 deletions
|
@ -373,6 +373,19 @@ $(document).ready(function () {
|
|||
$body.removeClass("aside-out");
|
||||
});
|
||||
|
||||
$(".offcanvas-right-toggle").on("click", function (event) {
|
||||
event.preventDefault();
|
||||
// FIXME: Doesn't toggle, menu stays open even when pressing the button again
|
||||
$("body").toggleClass("offcanvas-right-active");
|
||||
});
|
||||
|
||||
$(document).on("mouseup touchend", function (event) {
|
||||
var offCanvas = $(".offcanvas-right");
|
||||
if (!offCanvas.is(event.target) && offCanvas.has(event.target).length === 0) {
|
||||
$("body").removeClass("offcanvas-right-active");
|
||||
}
|
||||
});
|
||||
|
||||
// Event listener for 'Show & hide event map' button in the network stream.
|
||||
$body.on("click", ".event-map-btn", function () {
|
||||
showHideEventMap(this);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue