違いが分かりにくい「mouseover/mouseout」と「mouseenter/mouseleave」イベントの使い分け方法を解説。また、これらに関連する「hover」イベントメソッドについても説明する。 ← 前回 連載 INDEX 次回 → 別稿「イベントに応じて処理を実行するには?」の表でも触れたように、jQueryではさまざまな<イベント名>メソッドが標準で用意されています。そのうち、ほとんどが直感的に理解できるものばかりですが、mouseover/mouseoutとmouseenter/mouseleaveの違いは一見して分かりにくいものです。 本稿では、具体的なサンプルの中で、両者の違いを示すと共に、マウスの出入りを簡単に検出するhoverメソッドについても触れます。 mouseover/mouseoutとmouseenter/mouseleaveイベントの基本 まずは、具体