فهرست منبع

Merge pull request #29 from markmarkoh/patch-1

Return selected elements for chaining
Mattia Larentis 12 سال پیش
والد
کامیت
378e8f8183
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