- $('.welcome .close').on('click', function() {
- $('.welcome').hide();
- $.cookie("_osm_welcome", 'hide', { expires: expiry });
+ $(".welcome .btn-close").on("click", function () {
+ $(".welcome").removeClass("visible");
+ Cookies.set("_osm_welcome", "hide", { secure: true, expires: expiry, path: "/", samesite: "lax" });
+ });
+
+ var bannerExpiry = new Date();
+ bannerExpiry.setYear(bannerExpiry.getFullYear() + 1);
+
+ $("#banner .btn-close").on("click", function (e) {
+ var cookieId = e.target.id;
+ $("#banner").hide();
+ e.preventDefault();
+ if (cookieId) {
+ Cookies.set(cookieId, "hide", { secure: true, expires: bannerExpiry, path: "/", samesite: "lax" });
+ }