Commits

rocco_storm committed 812358e

use jQuery.off() instead od deprecated .unbind() function

Comments (0)

Files changed (1)

pinry/static/js/pinry.js

         // Delete pin if trash icon clicked
         $('.icon-trash').each(function() {
             var thisPin = $(this);
-            $(this).unbind('click');
+            $(this).off('click');
             $(this).click(function() {
                 $(this).off('click');
                 var promise = deletePinData($(this).data('id'));
         $('.pin').each(function(){
             var thisPin = $(this);
             thisPin.find('.editable').hide();
-            thisPin.unbind('hover');
+            thisPin.off('hover');
             thisPin.hover(function() {
                 thisPin.find('.editable').toggle();
             });