瀏覽代碼

Added `setTextLabel` and `setIconLabel` methods

Francesco Pontillo 11 年之前
父節點
當前提交
220c9c30d7
共有 2 個文件被更改,包括 3 次插入3 次删除
  1. 2 2
      static/js/bootstrap-switch.js
  2. 1 1
      static/js/bootstrap-switch.min.js

+ 2 - 2
static/js/bootstrap-switch.js

@@ -42,7 +42,7 @@
 
             $element.addClass('has-switch');
 
-            if ($element.data('on') !== undefined)
+            if ($element.data('on'))
               color = "switch-" + $element.data('on');
 
             if ($element.data('on-label') !== undefined)
@@ -64,7 +64,7 @@
               .html(onLabel);
 
             color = '';
-            if ($element.data('off') !== undefined)
+            if ($element.data('off'))
               color = "switch-" + $element.data('off');
 
             $switchRight = $('<span>')

文件差異過大導致無法顯示
+ 1 - 1
static/js/bootstrap-switch.min.js


部分文件因文件數量過多而無法顯示