From f34cfd1bff9b6cc71fd4552b139a59fb432dfb29 Mon Sep 17 00:00:00 2001 From: marcoc Date: Thu, 11 Jan 2024 18:04:33 +0100 Subject: [PATCH] added .fullwidth class support --- assets/scripts/scripts.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/assets/scripts/scripts.js b/assets/scripts/scripts.js index 29a9b85..a509ad9 100755 --- a/assets/scripts/scripts.js +++ b/assets/scripts/scripts.js @@ -14,3 +14,15 @@ const toggleMenu = (event) => { $('.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); \ No newline at end of file