Created
February 26, 2020 11:58
-
-
Save BoyetDgte/9798a923f98dc35e29a30a7dc49561fb to your computer and use it in GitHub Desktop.
Add a Class or ID in Wordpress specific menu <a> tag instead of the <li> tag using jQuery
This file contains hidden or 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
// class name example | |
jQuery( "#menu-item-30142 a" ).ready( function( $ ){ | |
$( "#menu-item-30142 a" ).addClass("class-name"); | |
}); | |
// #menu-item-30142 a is the element id with <a> tag |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment