我必須使用導航菜單的日期打開子菜單,並顯示其匹配的鏈接。我無法更改HTML。 我有沒有絲毫的想法如何做到這一點使用「數據相關面板」有人幫助我?使用數據的下拉菜單 - 顯示子菜單
<!-- nav menu -->
<nav>
<ul>
<li><a href="#" data-related-panel="space">Space</a></li>
<li><a href="#" data-related-panel="earth">Earth Science</a></li>
<li><a href="#" data-related-panel="technology">Technology</a></li>
<li><a href="#" data-related-panel="physics">Physics</a></li>
<li><a href="#" data-related-panel="gallery">Gallery</a></li>
</ul>
</nav>
<!-- dropdown -->
<div id="dropdown">
<section id="space" class="nav-panel">
<ul>
<li><a href="#">Missions</a></li>
<li><a href="#">Technology</a></li>
<li><a href="#">Aeronautics</a></li>
<li><a href="#">Education</a></li>
<li><a href="#">History</a></li>
</ul>
</section>
<section id="earth" class="nav-panel">
<ul>
<li><a href="#">Geology</a></li>
<li><a href="#">Oceanography</a></li>
<li><a href="#">Meteorology</a></li>
<li><a href="#">Weather</a></li>
<li><a href="#">Projects</a></li>
</ul>
</section>
<section id="technology" class="nav-panel">
<ul>
<li><a href="#">Music</a></li>
<li><a href="#">Machines</a></li>
<li><a href="#">Computers</a></li>
<li><a href="#">News</a></li>
<li><a href="#">Projects</a></li>
</ul>
</section>
<section id="physics" class="nav-panel">
<ul>
<li><a href="#">Relativity</a></li>
<li><a href="#">Quantum mechanics</a></li>
<li><a href="#">Electromagnetism</a></li>
<li><a href="#">Thermodynamics</a></li>
</ul>
</section>
<section id="gallery" class="nav-panel">
<ul>
<li><a href="#">Featured Photos</a></li>
<li><a href="#">Photos</a></li>
<li><a href="#">Contests</a></li>
<li><a href="#">Videos</a></li>
<li><a href="#">Archive</a></li>
<li><a href="#">Shoes</a></li>
</ul>
</section>
</div>