import $ from 'jquery'; /** * Mobile navigation toggle * @param {mixed} event */ const toggleMenu = (event) => { event.preventDefault(); $('.js-menu-toggle').toggleClass('open'); $('body').toggleClass('menu-open'); $('.header__navigation').fadeToggle(); }; $('.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);