开发者

how to not hide a li when moving mouse out of ul

开发者 https://www.devze.com 2023-01-12 09:12 出处:网络
This code and problem must be familiar, but I have not found anything. Any help is appreciated. $(document).ready(function(){

This code and problem must be familiar, but I have not found anything. Any help is appreciated.

$(document).ready(function(){
  $("ul.header1").children("li").hide();

  $('ul.header1').mouseenter(function(){
    $("ul.header1").children("li").slideDown("fast");
  });

  $('ul.header1').mouseleave(function(){
    $("ul.header1").开发者_运维百科children("li").delay(500).slideUp("fast");
  });

  $("li.sub").mouseenter(function(){
    $("ul.header1").css('background-color','red');
    $("ul.header1").stop();    
  });

  $("img.myClass").mouseenter(function(){
    $("ul.header1").css('color','red');
    $("ul.header1").stop();        
  });
});


http://www.eurotel-bih.com/

You can copy my code if that menu is what you looking for.

$("#menu ul li").click(function(){$("#menu ul li ul").hide(0);$(this).find("ul").slideDown(400);});


remove

$("ul.header1").children("li").delay(500).slideUp("fast");
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号