Преглед на файлове

Return selected elements for chaining

So we can do `$('.switch').bootstrapSwitch().on('switch-change', ...)`
Mark DiMarco преди 12 години
родител
ревизия
91ab337152
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      static/js/bootstrapSwitch.js

+ 1 - 1
static/js/bootstrapSwitch.js

@@ -12,7 +12,7 @@
   $.fn['bootstrapSwitch'] = function (method) {
     var methods = {
       init: function () {
-        this.each(function () {
+        return this.each(function () {
             var $element = $(this)
               , $div
               , $switchLeft