Pārlūkot izejas kodu

Return selected elements for chaining

So we can do `$('.switch').bootstrapSwitch().on('switch-change', ...)`
Mark DiMarco 12 gadi atpakaļ
vecāks
revīzija
91ab337152
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  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