-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
34 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,19 @@ | ||
/** | ||
* Place your custom JS here | ||
*/ | ||
jQuery( document ).ready( function( $ ) { | ||
|
||
// Create collapsible sub menus in Divi Header Nav | ||
$( "<div class='sub-menu-toggle'></div>" ).insertBefore( "#main-header #mobile_menu.et_mobile_menu .menu-item-has-children > a" ); | ||
|
||
// Submenu toggle | ||
const subMenuToggle = $( '#main-header #mobile_menu.et_mobile_menu .sub-menu-toggle' ) | ||
|
||
if ( subMenuToggle.length ) { | ||
// Add the click event | ||
subMenuToggle.click( function() { | ||
// Toggle the class | ||
$( this ).toggleClass( 'popped' ); | ||
} ); | ||
} | ||
|
||
// Place custom javascript here | ||
// console.log( 'Hello World!' ); | ||
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.