Skip to content

Instantly share code, notes, and snippets.

@ahmedch1
Created June 15, 2024 06:29
Show Gist options
  • Select an option

  • Save ahmedch1/b84cc605c04cbb8c26c3cc29da25c592 to your computer and use it in GitHub Desktop.

Select an option

Save ahmedch1/b84cc605c04cbb8c26c3cc29da25c592 to your computer and use it in GitHub Desktop.

Revisions

  1. ahmedch1 created this gist Jun 15, 2024.
    22 changes: 22 additions & 0 deletions ap.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    import domReady from '@roots/sage/client/dom-ready';
    +import {custom} from "@scripts/custom.js";

    /**
    * Application entrypoint
    */
    domReady(async () => {
    // application code
    -
    + //custom();
    // global js

    // menu scroll functionality
    @@ -40,7 +41,7 @@ domReady(async () => {
    }

    // mobile menu funcitonality
    - if (document.getElementById('header__menu-toggle')) {
    + if (document.getElementById('header__menu-toggle')) {
    var menuToggle = document.querySelector('#header__menu-toggle');
    var menu = document.querySelector('#nav__menu-modal');
    var body = document.querySelector('body');