diff options
author | Alexander Schmitz <arschmitz@gmail.com> | 2015-05-13 21:58:16 -0400 |
---|---|---|
committer | Alexander Schmitz <arschmitz@gmail.com> | 2015-05-20 14:27:56 -0400 |
commit | 35ef105430e1c3295cd18841ce2cf2a79b26d69a (patch) | |
tree | 1e71f24b326659d6037ad249761c44789210a24e | |
parent | ce949812b671d26f82e21f1856d73fde2f43f2dd (diff) | |
download | jquery-ui-35ef105430e1c3295cd18841ce2cf2a79b26d69a.tar.gz jquery-ui-35ef105430e1c3295cd18841ce2cf2a79b26d69a.zip |
Droppable: Remove core event/alias and deprecated module dependencies
-rw-r--r-- | demos/droppable/photo-manager.html | 2 | ||||
-rw-r--r-- | tests/unit/droppable/options.js | 6 | ||||
-rw-r--r-- | ui/droppable.js | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/demos/droppable/photo-manager.html b/demos/droppable/photo-manager.html index 6a8cf33d1..39afa9c32 100644 --- a/demos/droppable/photo-manager.html +++ b/demos/droppable/photo-manager.html @@ -124,7 +124,7 @@ } // resolve the icons behavior with event delegation - $( "ul.gallery > li" ).click(function( event ) { + $( "ul.gallery > li" ).on( "click", function( event ) { var $item = $( this ), $target = $( event.target ); diff --git a/tests/unit/droppable/options.js b/tests/unit/droppable/options.js index f2d1757c2..c7c0dbdd6 100644 --- a/tests/unit/droppable/options.js +++ b/tests/unit/droppable/options.js @@ -134,7 +134,7 @@ test( "tolerance, intersect", function() { left: 0 }); - droppable.unbind( "drop" ).bind( "drop", function() { + droppable.off( "drop" ).on( "drop", function() { equal( true, data[ 2 ], data[ 3 ] ); }); @@ -173,7 +173,7 @@ test( "tolerance, pointer", function() { $.each( dataset, function() { var data = this; - droppable.unbind( "drop" ).bind( "drop", function() { + droppable.off( "drop" ).on( "drop", function() { equal( true, data[ 2 ], data[ 3 ] ); }); @@ -187,7 +187,7 @@ test( "tolerance, pointer", function() { draggable.css({ top: 0, left: 0 }).draggable( "option", "axis", "x" ); droppable.css({ top: 15, left: 15 }); - droppable.unbind( "drop" ).bind( "drop", function() { + droppable.off( "drop" ).on( "drop", function() { ok( true, "drop fires as long as pointer is within droppable" ); }); diff --git a/ui/droppable.js b/ui/droppable.js index 98be34bab..74d54d077 100644 --- a/ui/droppable.js +++ b/ui/droppable.js @@ -348,7 +348,7 @@ $.ui.ddmanager = { }, dragStart: function( draggable, event ) { // Listen for scrolling so that if the dragging causes scrolling the position of the droppables can be recalculated (see #5003) - draggable.element.parentsUntil( "body" ).bind( "scroll.droppable", function() { + draggable.element.parentsUntil( "body" ).on( "scroll.droppable", function() { if ( !draggable.options.refreshPositions ) { $.ui.ddmanager.prepareOffsets( draggable, event ); } @@ -409,7 +409,7 @@ $.ui.ddmanager = { }, dragStop: function( draggable, event ) { - draggable.element.parentsUntil( "body" ).unbind( "scroll.droppable" ); + draggable.element.parentsUntil( "body" ).off( "scroll.droppable" ); // Call prepareOffsets one final time since IE does not fire return scroll events when overflow was caused by drag (see #5003) if ( !draggable.options.refreshPositions ) { $.ui.ddmanager.prepareOffsets( draggable, event ); |