diff options
author | Michał Gołębiowski <m.goleb@gmail.com> | 2013-03-04 03:22:11 +0100 |
---|---|---|
committer | Richard Gibson <richard.gibson@gmail.com> | 2013-04-07 00:48:58 -0400 |
commit | 8594decfccd9bd9efe180bca3ed0869cd051a209 (patch) | |
tree | 0eb3f0395add5a44ad5d5981b014e5c416afcd9a /test/unit/manipulation.js | |
parent | 8f4bebea7d58d503cfde46e3b2b01c1a39b3e346 (diff) | |
download | jquery-8594decfccd9bd9efe180bca3ed0869cd051a209.tar.gz jquery-8594decfccd9bd9efe180bca3ed0869cd051a209.zip |
Ref #13554: Move redundant methods to event-alias.js. Close gh-1225.
(cherry picked from commits 8ca9f931ec311b6f73990eac7665451a28bceac3 84a94acae1ed7d65d91df235985e433d34486dc3 100d3c351604e1f9641098da2e78678b4e6d9cdf)
Diffstat (limited to 'test/unit/manipulation.js')
-rw-r--r-- | test/unit/manipulation.js | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/test/unit/manipulation.js b/test/unit/manipulation.js index c3c83b4f5..c6505fa18 100644 --- a/test/unit/manipulation.js +++ b/test/unit/manipulation.js @@ -172,8 +172,8 @@ var testWrap = function( val ) { ok( true, "Event triggered." ); // Remove handlers on detached elements - result.unbind(); - jQuery(this).unbind(); + result.off(); + jQuery(this).off(); }); j = jQuery("<span/>").wrap( result ); @@ -643,9 +643,9 @@ test( "append the same fragment with events (Bug #6997, 5566)", function() { if ( doExtra ) { element = jQuery("div:first").on( "click", function() { ok( true, "Event exists on original after being unbound on clone" ); - jQuery( this ).unbind("click"); + jQuery( this ).off("click"); }); - clone = element.clone( true ).unbind("click"); + clone = element.clone( true ).off("click"); clone[ 0 ].fireEvent("onclick"); element[ 0 ].fireEvent("onclick"); @@ -2021,7 +2021,7 @@ test( "Cloned, detached HTML5 elems (#10667,10670)", function() { } // Bind an event - $section.bind( "click", function( event ) { + $section.on( "click", function( event ) { ok( true, "clone fired event" ); }); @@ -2030,7 +2030,7 @@ test( "Cloned, detached HTML5 elems (#10667,10670)", function() { // Trigger an event from the first clone $clone.trigger("click"); - $clone.unbind("click"); + $clone.off("click"); // Add a child node with text to the original $section.append("<p>Hello</p>"); @@ -2042,7 +2042,7 @@ test( "Cloned, detached HTML5 elems (#10667,10670)", function() { // Trigger an event from the third clone $clone.trigger("click"); - $clone.unbind("click"); + $clone.off("click"); // Add attributes to copy $section.attr({ @@ -2069,8 +2069,8 @@ test( "Cloned, detached HTML5 elems (#10667,10670)", function() { $section.trigger("click"); // Unbind any remaining events - $section.unbind("click"); - $clone.unbind("click"); + $section.off("click"); + $clone.off("click"); }); test( "Guard against exceptions when clearing safeChildNodes", function() { |