소스 검색

Merge pull request #86 from BdMdesigN/Test

Change in 2 functions ('input:checkbox') to ('input') (radioswitch fix) and change at inputfields "attr" to "prop"
Stein, Peter 11 년 전
부모
커밋
43d4ba83a4
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      static/js/bootstrap-switch.js

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

@@ -229,7 +229,7 @@
         var $this = $(this);
         var $this = $(this);
 
 
         $this.toggleClass('deactivate');
         $this.toggleClass('deactivate');
-        $this.find('input:checkbox').attr('disabled', $this.is('.deactivate'));
+        $this.find('input').prop('disabled', $this.is('.deactivate'));
       },
       },
       isActive: function () {
       isActive: function () {
         return !$(this).hasClass('deactivate');
         return !$(this).hasClass('deactivate');
@@ -239,11 +239,11 @@
 
 
         if (active) {
         if (active) {
           $this.removeClass('deactivate');
           $this.removeClass('deactivate');
-          $this.find('input:checkbox').attr('disabled', false);
+          $this.find('input').prop('disabled', false);
         }
         }
         else {
         else {
           $this.addClass('deactivate');
           $this.addClass('deactivate');
-          $this.find('input:checkbox').attr('disabled', true);
+          $this.find('input').prop('disabled', true);
         }
         }
       },
       },
       toggleState: function (skipOnChange) {
       toggleState: function (skipOnChange) {