Explorar o código

Return selected elements for chaining

So we can do `$('.switch').bootstrapSwitch().on('switch-change', ...)`
Mark DiMarco %!s(int64=12) %!d(string=hai) anos
pai
achega
91ab337152
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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