Explorar o código

substituted unbind in favor of off

Emanuele Marchi %!s(int64=11) %!d(string=hai) anos
pai
achega
70af6de4bb

+ 2 - 2
build/js/bootstrap-switch.js

@@ -373,9 +373,9 @@
           $div = $element.parent();
           $form = $div.closest("form");
           $div.children().not($element).remove();
-          $element.unwrap().unwrap().unbind("change");
+          $element.unwrap().unwrap().off("change");
           if ($form.length) {
-            $form.unbind("reset").removeData("bootstrap-switch");
+            $form.off("reset").removeData("bootstrap-switch");
           }
           return $element;
         }

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
build/js/bootstrap-switch.min.js


+ 3 - 3
src/coffee/bootstrap-switch.coffee

@@ -39,7 +39,7 @@
           )
           $form = $element.closest("form")
           changeState = ->
-            return if $label.hasClass("label-change-switch")
+            return if $label.hasClass "label-change-switch"
 
             $label
             .trigger("mousedown")
@@ -328,8 +328,8 @@
         $form = $div.closest("form")
 
         $div.children().not($element).remove()
-        $element.unwrap().unwrap().unbind "change"
-        $form.unbind("reset").removeData "bootstrap-switch" if $form.length
+        $element.unwrap().unwrap().off "change"
+        $form.off("reset").removeData "bootstrap-switch" if $form.length
         $element
 
     return methods[method].apply(@, Array::slice.call(arguments, 1)) if methods[method]

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio