added .fullwidth class support

This commit is contained in:
Marco Cavalli 2024-01-11 18:04:33 +01:00
parent 251b6a8e3f
commit f34cfd1bff
1 changed files with 12 additions and 0 deletions

View File

@ -14,3 +14,15 @@ const toggleMenu = (event) => {
$('.js-menu-toggle').on('click', toggleMenu); $('.js-menu-toggle').on('click', toggleMenu);
const fullWidth = () => {
console.log('FullWidth: loaded;');
const windowWidth = $("body").prop("clientWidth");
const margin = - ((windowWidth - 1200) / 2) + 20;
$('.fullwidth').each(function(i, el) {
console.log($(this));
$(this).width(windowWidth);
});
};
$(window).on('load', fullWidth);
$(window).on('resize', fullWidth);