close

找了好久還是無法解決這個問題

settimeout

or

delay

有找到一篇是我想用的效果

http://www.zhangxinxu.com/wordpress/2010/07/jquery-%E9%BC%A0%E6%A0%87%E7%BB%8F%E8%BF%87hover%E4%BA%8B%E4%BB%B6%E7%9A%84%E5%BB%B6%E6%97%B6%E5%A4%84%E7%90%86/

不過他是把清單跟主選項包一起

我卻是把清單跟主選項分開包在不同的class中

這該怎麼寫呢??

頭大~

 

今天上課後問老師,還是老師厲害

不用用到

settimeout

or

delay

簡簡單單就解決了

我想了老半天,查了老半天

還是問老師快

原來解決方法這麼簡單

善用moseleave和moseenter。

$('.list_1').mouseenter(function(){$('.list1').css("visibility","visible");})

$('.list1').mouseleave(function(){$('.list1').css("visibility","hidden");})

$('header').mouseenter(function(){$('.list1').css("visibility","hidden");})
$('.list_2').mouseenter(function(){$('.list1').css("visibility","hidden");})

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 mosquitoyo 的頭像
    mosquitoyo

    mosquitoyo~

    mosquitoyo 發表在 痞客邦 留言(0) 人氣()