jQuery hide div on mouseout

前端 未结 3 1139
梦如初夏
梦如初夏 2021-01-05 08:39

I saw a lot of posts on this item, but couldn\'t find the right solution. Sorry if it\'s already answered somewhere.

What I want: I have a DIV

3条回答
  •  悲&欢浪女
    2021-01-05 09:07

    You can keep the HTML as is and simply add the following:

    $("#menudiv").mouseleave(function(){
        $(this).hide();
    });
    

    jsFiddle: http://jsfiddle.net/5SSDz/

提交回复
热议问题