简体   繁体   中英

make sub menu open on hover not on click

Hello i have this menu that i want it to open the sub menus on hover.

here is the test its just missing a icon but dont mind it. Can you pin point where should i change the css. Thanks

  <div id="cssmenu" style="margin-top:80px">
  <ul>

  <li class='active has-sub'><a href='#'><img src="ico.png" width="19" height="19" style="margin-right:10px"><span>Resturant</span></a>
  <ul>
     <li ><a href="resturant.html"><span>MENU</span></a>

     </li>
     <li ><a href=''><span>SELSKABER</span></a>

     </li>
       <li><a href=''><span>KOGEBØGER MM.</span></a>

     </li>
   </ul>
  </li>
  <li><a href='gallery.html'><img src="ico.png" width="19" height="19" style="margin-right:10px"><span>Undstilling</span></a></li>
  <li class='last'><a href='contact.html'><img src="ico.png" width="19" height="19" style="margin-right:10px"><span>Om stedet</span></a></li>
  </ul>
  </div>

Hy friend try this

$('#cssmenu li.has-sub>a').mouseover(function(){
//or
$('#cssmenu li.has-sub>a').on('mouseover', function(){

See this example

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM