How to replace a drop-down menu when you hover on drop-down when clicking?

Comrades, tell me the easiest way how to do is the top menu dropdown on mouse hover on the top menu, the dropdown when clicking? The website on wp -
July 8th 19 at 11:52
1 answer
July 8th 19 at 11:54
Something like this:
$( "#menu-id" ).click(function() {
 $( "#drop-down" ).css("opacity", "1");

When you click on menu with id="menu-id" is added to the CSS property {opacity:1} for block with id="drop-down". To go to the website did not work, so threw an example, I think that he will understand.
the website address has an extra point just, right so
And where exactly to insert this code in function.php or header.php? - nikita.Stracke commented on July 8th 19 at 11:57
this is a common js code to insert in footer.php - alden73 commented on July 8th 19 at 12:00

Find more questions by tags CSSHTMLWordPress