add body class when cookie consent warning is open

v1.18.x
Andrew Rodrigues 6 years ago
parent 82cda248f3
commit e2ecbae06c

@ -692,6 +692,7 @@ app.cacheBuster = null;
app.parseAndTranslate('partials/cookie-consent', config.cookies, function (html) {
$(document.body).append(html);
$(document.body).addClass('cookie-consent-open');
var warningEl = $('.cookie-consent');
var dismissEl = warningEl.find('button');
@ -699,6 +700,7 @@ app.cacheBuster = null;
// Save consent cookie and remove warning element
storage.setItem('cookieconsent', '1');
warningEl.remove();
$(document.body).removeClass('cookie-consent-open');
});
});
});

Loading…
Cancel
Save