div (.modal) をマウスアウトで非表示にしたいのですが、ホバーが .modal または .tooltip クラスにない場合のみです。
私のコード:
jQuery('html').hover(function() {
jQuery('.modal').fadeOut('fast');
});
jQuery('.tooltip, .modal').hover(function(event){
var toolTipId = jQuery(this).attr('id');
modal = jQuery(this).parent().next().find('.'+toolTipId+'');
if(!modal.is(":visible")) {
modal.stop().fadeIn('fast');
}
event.stopPropagation();
});
ホバーの代わりにクリックを使用する場合、これは完璧に機能します。これをホバーで動作するように適応させるにはどうすればよいですか?