How do I refer to the parent when hovering a child block?
-
There is a dropdown-child menu that appears when you click on the dropdown: hover button. The problem is in the mobile version: when you click on a link that sends to the anchor on the same page, the dropdown-child disappears only when you click on another area, but it needs to disappear itself. How to do it?
<div class="dropdown"> <button class="mainmenubtn"><img id="menu" src="imag/menu.png" alt="Beam Craft"></button> <div class="dropdown-child" align="center"> <a href="blog/index.html">Блог</a> <a href="#about">О нас</a> <a href="#footer">Контакты</a> </div> </div>
JavaScript Andrew Hood, Feb 26, 2019
0 Answers
Your Answer
To place the code, please use CodePen or similar tool. Thanks you!