$( selector ).mouseenter( handlerIn ).mouseleave( handlerOut );
$( selector ).hover( handlerIn, handlerOut )Example:
$( "p" ).hover(
function() { // マウスが
に入る $( this ).addClass( "hover" );
}, function() { // マウスは zone
を終了します $( this ).removeClass( "hover" );
}
);
$(selector).hover(handlerInOut)hover() の場合、2 つのイベントを実行します。 mouseenter および mouseleaveです。これにより、jQuery ユーザーはハンドラーで異なるフェールオーバー メソッドを使用したり、event.type.
$( selector ).on( "マウスポインタの出入り", handlerInOut );
Please disable your ad blocker and refresh the window to use this website.