diff options
author | Dave Methvin <dave.methvin@gmail.com> | 2011-09-08 09:03:16 -0400 |
---|---|---|
committer | timmywil <timmywillisn@gmail.com> | 2011-09-19 15:42:31 -0400 |
commit | 38601e07dae4bc4304eb9842faec5396c9eab787 (patch) | |
tree | 734fa0235810b0f6c46fb8c6bbc14ded269c1a8e /test/hovertest.html | |
parent | 2886249e84560b1fbc4e0ab777d703a6a6fdca8d (diff) | |
download | jquery-38601e07dae4bc4304eb9842faec5396c9eab787.tar.gz jquery-38601e07dae4bc4304eb9842faec5396c9eab787.zip |
Remove the relatedTarget adjustment for mouseenter/leave events, it's an ambiguous case anyway and it is expensive to do.
Diffstat (limited to 'test/hovertest.html')
-rw-r--r-- | test/hovertest.html | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/test/hovertest.html b/test/hovertest.html index 4c101ec00..d6242091e 100644 --- a/test/hovertest.html +++ b/test/hovertest.html @@ -44,8 +44,7 @@ p { Mouse over here should NOT trigger the counter. </div> </div> - - <div id="livebox" class="hover-box"> + <div id="liveenterbox" class="hover-box"> <div class="hover-status"> <button>Activate</button> Live enter/leave: <span class="ins">0</span> / <span class="outs">0</span> @@ -54,7 +53,6 @@ p { Mouse over here should NOT trigger the counter. </div> </div> - <div id="delegateenterbox" class="hover-box"> <div class="hover-status"> <button>Activate</button> @@ -74,6 +72,15 @@ p { Mouse over here SHOULD trigger the counter. </div> </div> + <div id="liveoverbox" class="hover-box"> + <div class="hover-status"> + <button>Activate</button> + Live over/out: <span class="ins">0</span> / <span class="outs">0</span> + </div> + <div class="hover-inside"> + Mouse over here SHOULD trigger the counter. + </div> + </div> <div id="delegateoverbox" class="hover-box"> <div class="hover-status"> <button>Activate</button> @@ -115,8 +122,8 @@ $(function(){ .delegate("#delegateenterbox", "mouseleave", countOuts ); $(this).remove(); }); - $("#livebox button").click(function(){ - $("#livebox") + $("#liveenterbox button").click(function(){ + $("#liveenterbox") .data({ ins: 0, outs: 0 }) .live("mouseenter", countIns ) .live("mouseleave", countOuts ); @@ -130,6 +137,13 @@ $(function(){ .bind("mouseout", countOuts ); $(this).remove(); }); + $("#liveoverbox button").click(function(){ + $("#liveoverbox") + .data({ ins: 0, outs: 0 }) + .live("mouseover", countIns ) + .live("mouseout", countOuts ); + $(this).remove(); + }); $("#delegateoverbox button").click(function(){ $(document) .find("#delegateoverbox").data({ ins: 0, outs: 0 }).end() |