Browse Source

substituted unbind in favor of off

Emanuele Marchi 11 years ago
parent
commit
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;
         }

File diff suppressed because it is too large
+ 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]

Some files were not shown because too many files changed in this diff