Title: Make text toggle dropdown box in menu.
Last modified: May 21, 2020

---

# Make text toggle dropdown box in menu.

 *  [jacobmwolf](https://wordpress.org/support/users/jacobmwolf/)
 * (@jacobmwolf)
 * [6 years ago](https://wordpress.org/support/topic/make-text-toggle-dropdown-box-in-menu/)
 * Hi,
 * Can someone help me add some code to my theme editor so that whenever someone
   clicks on the word “Illustration” in my side menu, it toggles the drop-down menu,
   basically giving the text the same function as the arrow icon next to it.
 * Cheers
    Jacob
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fmake-text-toggle-dropdown-box-in-menu%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Theme Author [Anders Norén](https://wordpress.org/support/users/anlino/)
 * (@anlino)
 * [6 years ago](https://wordpress.org/support/topic/make-text-toggle-dropdown-box-in-menu/#post-12873922)
 * Hi [@jacobmwolf](https://wordpress.org/support/users/jacobmwolf/),
 * This jQuery should do it:
 *     ```
       $( '.menu-item-363 > .ancestor-wrapper > a' ).on( 'click', function() {
       	$( this ).siblings( '.sub-menu-toggle-wrapper' ).children( '.sub-menu-toggle' ).trigger( 'click' );
       	return false;
       } );
       ```
   
 * You’ll need to add it to a `.js` file and enqueue it in a child theme, unless
   you can find a plugin that lets you add JavaScript to the site through an editor
   in the administration panel (sounds like something that should exist, but I don’t
   know of one off the top of my head).
 * — Anders

Viewing 1 replies (of 1 total)

The topic ‘Make text toggle dropdown box in menu.’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/chaplin/2.6.8/screenshot.png)
 * Chaplin
 * [Support Threads](https://wordpress.org/support/theme/chaplin/)
 * [Active Topics](https://wordpress.org/support/theme/chaplin/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/chaplin/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/chaplin/reviews/)

## Tags

 * [dropdown](https://wordpress.org/support/topic-tag/dropdown/)
 * [html](https://wordpress.org/support/topic-tag/html/)
 * [menu](https://wordpress.org/support/topic-tag/menu/)
 * [simple](https://wordpress.org/support/topic-tag/simple/)
 * [ui](https://wordpress.org/support/topic-tag/ui/)

 * 1 reply
 * 2 participants
 * Last reply from: [Anders Norén](https://wordpress.org/support/users/anlino/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/make-text-toggle-dropdown-box-in-menu/#post-12873922)
 * Status: not resolved