Skip to content

Commit 35ef105

Browse files
committed
Droppable: Remove core event/alias and deprecated module dependencies
1 parent ce94981 commit 35ef105

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

demos/droppable/photo-manager.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124
}
125125

126126
// resolve the icons behavior with event delegation
127-
$( "ul.gallery > li" ).click(function( event ) {
127+
$( "ul.gallery > li" ).on( "click", function( event ) {
128128
var $item = $( this ),
129129
$target = $( event.target );
130130

tests/unit/droppable/options.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ test( "tolerance, intersect", function() {
134134
left: 0
135135
});
136136

137-
droppable.unbind( "drop" ).bind( "drop", function() {
137+
droppable.off( "drop" ).on( "drop", function() {
138138
equal( true, data[ 2 ], data[ 3 ] );
139139
});
140140

@@ -173,7 +173,7 @@ test( "tolerance, pointer", function() {
173173
$.each( dataset, function() {
174174
var data = this;
175175

176-
droppable.unbind( "drop" ).bind( "drop", function() {
176+
droppable.off( "drop" ).on( "drop", function() {
177177
equal( true, data[ 2 ], data[ 3 ] );
178178
});
179179

@@ -187,7 +187,7 @@ test( "tolerance, pointer", function() {
187187
draggable.css({ top: 0, left: 0 }).draggable( "option", "axis", "x" );
188188
droppable.css({ top: 15, left: 15 });
189189

190-
droppable.unbind( "drop" ).bind( "drop", function() {
190+
droppable.off( "drop" ).on( "drop", function() {
191191
ok( true, "drop fires as long as pointer is within droppable" );
192192
});
193193

ui/droppable.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ $.ui.ddmanager = {
348348
},
349349
dragStart: function( draggable, event ) {
350350
// Listen for scrolling so that if the dragging causes scrolling the position of the droppables can be recalculated (see #5003)
351-
draggable.element.parentsUntil( "body" ).bind( "scroll.droppable", function() {
351+
draggable.element.parentsUntil( "body" ).on( "scroll.droppable", function() {
352352
if ( !draggable.options.refreshPositions ) {
353353
$.ui.ddmanager.prepareOffsets( draggable, event );
354354
}
@@ -409,7 +409,7 @@ $.ui.ddmanager = {
409409

410410
},
411411
dragStop: function( draggable, event ) {
412-
draggable.element.parentsUntil( "body" ).unbind( "scroll.droppable" );
412+
draggable.element.parentsUntil( "body" ).off( "scroll.droppable" );
413413
// Call prepareOffsets one final time since IE does not fire return scroll events when overflow was caused by drag (see #5003)
414414
if ( !draggable.options.refreshPositions ) {
415415
$.ui.ddmanager.prepareOffsets( draggable, event );

0 commit comments

Comments
 (0)