2 lines
1.4 KiB
JavaScript
2 lines
1.4 KiB
JavaScript
"use strict";jQuery(function(t){t(".parent_prev_next").on("click","svg.cursor",function(){var e=t(this).data("id_article"),n=t(this).data("bloc_recharger");ajaxReload(n,{args:{id_article:e}})}),t("a.page-scroll").bind("click",function(e){t(this);t("html, body").animate({scrollTop:0},"slow"),e.preventDefault()});t(window).on("scroll",function(){0<t(window).scrollTop()?t("header").addClass("navbar-fixed-reduite"):t("header").removeClass("navbar-fixed-reduite")}),window.addEventListener("resize",function(){document.getElementById("result"),"matchMedia"in window&&(window.matchMedia("(min-width:768px)").matches?(t("#header").removeClass("navbar-fixed-top"),t("button.burgermenu, #barnav ul.js-sous-menu").removeClass("fixed-top")):(t("#header").addClass("navbar-fixed-top"),t("button.burgermenu, #barnav ul.js-sous-menu").addClass("fixed-top")))},!1)}),jQuery(function(t){var n,a;t(".js-sous-menu ul").addClass("js-hidden"),t(".js-sous-menu").on("click","a",function(e){e.stopPropagation();var n=t(this).next();if(n.length)return t(n).toggleClass("js-hidden"),!1}),"querySelector"in document&&"addEventListener"in window&&(window.document.documentElement.className+=" js-enabled",n=document.querySelector(".nav-button"),a=document.querySelector("#barnav"),n&&n.addEventListener("click",function(e){n.classList.toggle("is-active"),a.classList.toggle("is-opened"),e.preventDefault()},!1))});
|
|
//# sourceMappingURL=mon_site.min.js.map
|