소스 검색

Merge pull request #104 from Pasvaz/patch-1

Changing data-icon in favor of data-label-icon
Stein, Peter 11 년 전
부모
커밋
b0b95a433e
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      static/js/bootstrap-switch.js

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

@@ -50,8 +50,8 @@
             if ($element.data('off-label') !== undefined)
               offLabel = $element.data('off-label');
 
-            if ($element.data('icon') !== undefined)
-              icon = $element.data('icon');
+            if ($element.data('label-icon') !== undefined)
+              icon = $element.data('label-icon');
 
             $switchLeft = $('<span>')
               .addClass("switch-left")
@@ -75,7 +75,7 @@
               .attr('for', $element.find(inputSelector).attr('id'));
 
             if (icon) {
-              $label.html('<i class="icon icon-' + icon + '"></i>');
+              $label.html('<i class="icon ' + icon + '"></i>');
             }
 
             $div = $element.find(inputSelector).wrap($('<div>')).parent().data('animated', false);