Commit 11e5993e by Damien Moulard

only apply func on resize in a width threshold is passed

parent 5cfdcae6
Pipeline #1873 passed with stage
in 1 minute 31 seconds
......@@ -630,7 +630,17 @@ function init_shifts_exchange() {
}
$(window).smartresize(function() {
// only apply if a threshold is passed
if (
vw > 992 && window.innerWidth <= 992 ||
vw <= 992 && window.innerWidth > 992 ||
vw > 768 && window.innerWidth <= 768 ||
vw <= 768 && window.innerWidth > 768
) {
vw = window.innerWidth;
init_calendar_page();
} else {
vw = window.innerWidth;
}
});
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment