• Hello a few days ago I made a query about how to make a click on a button take me directly to a displayed submenu, the user guihom(thank you) told me to add this code:

    `$ (“ # Monbouton ”). On (“ click ”, function () {
    // mes actions
    })

    and now i have two more queries, which I am looking for and cannot find anywhere, how to know what is the id of the submenu and where do I have to put the code that you gave me?

    sorry if it’s too much work never insert code yet

Viewing 1 replies (of 1 total)
  • You would have to place it in a javascript file. If you have a child theme you can find the section in the functions.php file to enqueue your scripts.

    jquery runs in non conflict mode in wordpress. The function you have wouldn’t run as is. you would have to change it to something like this

    jQuery( document ).ready(function( $ ).

    Also when you enqueue your file you would have to make it dependent on jquery or it will also fail to work.

    If you haven’t done this before you might want to find a js programmer to help you. You do not want to add this to your theme because if the theme updates it would lose all your modifications. So do it in a child theme or a plugin.

    • This reply was modified 4 years, 10 months ago by mrtom414.
    • This reply was modified 4 years, 10 months ago by mrtom414.
Viewing 1 replies (of 1 total)
  • The topic ‘drop down a menu from a button last settings’ is closed to new replies.