|
|||||||||||
|
|||||||||||
mouseover(fn)
version 1.0 以降
解説
マッチした要素のmouseoverイベントに、イベントハンドラをバインドします。
通常、 引数
戻り値
関連例
例1:マウスがボックスに入ると、mouseoverイベントが発生したカウントとマウスの位置が表示されます。 function cursorInfo(event) { $("#info span:first").text(event.pageX) .nextAll("span:first").text(event.pageY) .nextAll("span:first").text(event.clientX) .nextAll("span:first").text(event.clientY) } var m = o = v = e = l = 0; $("#box") .mousemove(function(){ $("span:first", this).text(++m); cursorInfo(event); }) .mouseover(function(){ $("span:eq(1)", this).text(++v); cursorInfo(event); }) .mouseout(function(){ $("span:eq(2)", this).text(++o); cursorInfo(event); }) .mouseenter(function(){ $("span:eq(3)", this).text(++e); cursorInfo(event); }) .mouseleave(function(){ $("span:last", this).text(++l); cursorInfo(event); });
#box
mousemove: 0 child element
#info
pageX: - |
|
||||||||||
© 2007-2011 by いけまさ. All rights Reserved. |