diff options
author | John Resig <jeresig@gmail.com> | 2011-05-10 11:49:32 -0400 |
---|---|---|
committer | John Resig <jeresig@gmail.com> | 2011-05-10 11:49:32 -0400 |
commit | 419b5e5e2a0d376e71c3f37bf9a3d96f3b4a67f2 (patch) | |
tree | e7c517e8df3ea41e862ed977676c7a3c59ae696e /test/delegatetest.html | |
parent | 521ae562daa8f95def8872a55a260e9bdbc40d8b (diff) | |
download | jquery-419b5e5e2a0d376e71c3f37bf9a3d96f3b4a67f2.tar.gz jquery-419b5e5e2a0d376e71c3f37bf9a3d96f3b4a67f2.zip |
Make sure that mouseenter/mouseleave fire on the correct element when doing delegation. Fixes #9069.
Diffstat (limited to 'test/delegatetest.html')
-rw-r--r-- | test/delegatetest.html | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/delegatetest.html b/test/delegatetest.html index c4f33aaea..a5c6db17a 100644 --- a/test/delegatetest.html +++ b/test/delegatetest.html @@ -183,6 +183,16 @@ <td id='boundSubmit' class="red">DOCUMENT</td> </tr> </table> + + <h1>Mouseleave Tests</h1> + + <div class="out" style="margin:20px; border:1px solid #000; background: red;"> + <p>Count mouse leave event</p> + <div class="in" style="background: green; margin: 10px auto; width: 50%;"> + <p>mouse over here should not trigger the counter.</p> + </div> + <p>0</p> + </div> <ul id="log"></ul> @@ -270,6 +280,10 @@ jQuery("#boundSubmit").blink(); }); +var n = 0; +$("div.out").live("mouseleave", function() { + $("p:last", this).text(++n); +}); </script> </body> </html> |