0
我有一個下拉列表,我已經將mouseenter設置爲選項。所以如果鼠標在觸發器外面,菜單應該關閉。我正在使用jQuery 1.8.0。這可能是一個CSS問題?Dropit下拉不隱藏在mouseleave
這是我的代碼來初始化插件。
<script>
$(document).ready(function() {
$('.dropit-trigger').dropit({
action: 'mouseenter'
});
});
</script>
這是插件中此選項的代碼。怎麼了?
if(settings.action == 'mouseenter'){
$el.on('mouseleave', '.dropit-open', function(){
settings.beforeHide.call(this);
$(this).removeClass('dropit-open').find(settings.submenuEl).hide();
settings.afterHide.call(this);
});
}
請提供html和css或jsfiddle/codepen鏈接到演示。 – kbysiec
@kbysiec這裏是活的網站:http://patrickhofer.ch/ff/superfish/tmplt_stt_pool.php – olivier
@olivier但jsfiddle鏈接更有幫助。 –