Adding onclick event in custom menus

I have created menu from admin panel, now I have to add onclick event in li tag of each menu item like below:

<li><a href="#m-track-suite" onclick="hide('drop')">Track Suits</a></li>

For this I have installed https://wordpress.org/plugins/jin-menu/ plugin follow the steps as described in this documentation but onclick event not appearing.Below is the screen shot :

Read More

enter image description here

Related posts

1 comment

  1. Try the following code. Add this code a file which loads on each page or your header.php in themes

    jQuery('a[href="#m-track-suite"]').click(function(){
    
    //...do something..;
    
    });
    

Comments are closed.