]> source.dussan.org Git - jquery-ui.git/commitdiff
Droppable: Remove core event/alias and deprecated module dependencies
authorAlexander Schmitz <arschmitz@gmail.com>
Thu, 14 May 2015 01:58:16 +0000 (21:58 -0400)
committerAlexander Schmitz <arschmitz@gmail.com>
Wed, 20 May 2015 18:27:56 +0000 (14:27 -0400)
demos/droppable/photo-manager.html
tests/unit/droppable/options.js
ui/droppable.js

index 6a8cf33d18b95f2c1754d9c108239c8a41689fdc..39afa9c325a0b793711a066702311ca1f99ae5ea 100644 (file)
                }
 
                // 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 );
 
index f2d1757c25b668b511a62eded07b4e08b6bdf6d2..c7c0dbdd642a6abe6d071b0dc57105a0a1b22277 100644 (file)
@@ -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" );
        });
 
index 98be34bab289a1fc576e236e49900175e2a6564a..74d54d077ac92226784b24456e6c32beb62695ce 100644 (file)
@@ -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 );