.hover( handlerIn, handlerOut )
メソッド hover() は :
Syntax:$( selector ).mouseenter( handlerIn ).mouseleave( handlerOut );
$( selector ).hover( handlerIn, handlerOut )Example:
$( "p" ).hover(
function() { // マウスが
に入る $( this ).addClass( "hover" );
}, function() { // マウスは zone
を終了します $( this ).removeClass( "hover" );
}
);
.hover( handlerInOut )
このメソッドは、ターゲット要素領域の入力イベントと出力イベントの両方に対して同じ処理を繰り返す場合に便利です。Syntax:
$(selector).hover(handlerInOut)hover() の場合、2 つのイベントを実行します。 mouseenter および mouseleaveです。これにより、jQuery ユーザーはハンドラーで異なるフェールオーバー メソッドを使用したり、event.type.
例:
$( selector ).on( "マウスポインタの出入り", handlerInOut );
参照:
https://api.jquery.com/hover/
Commentaires (12)
Connectez-vous pour commenter
Rejoignez la discussion et partagez vos connaissances avec la communauté
Excellent tutoriel ! J'ai enfin compris comment utiliser Apache POI correctement.
Merci Jean ! N'hésitez pas si vous avez des questions.