Skip to content

Instantly share code, notes, and snippets.

@ahmedch1
Created June 15, 2024 06:29
Show Gist options
  • Save ahmedch1/b84cc605c04cbb8c26c3cc29da25c592 to your computer and use it in GitHub Desktop.
Save ahmedch1/b84cc605c04cbb8c26c3cc29da25c592 to your computer and use it in GitHub Desktop.
Call js function in app js (Sage wordpress)
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');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment