File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change 7979 // 1: On
8080 var switchOn = document . createElement ( 'label' ) ;
8181 switchOn . setAttribute ( 'class' , 'btn btn-' + this . options . onstyle + ' btn-' + this . options . size ) ;
82+ switchOn . setAttribute ( 'for' , this . element . id )
8283 switchOn . innerHTML = this . options . onlabel ;
8384
8485 // 2: Off
8586 var switchOff = document . createElement ( 'label' ) ;
8687 switchOff . setAttribute ( 'class' , 'btn btn-' + this . options . offstyle + ' btn-' + this . options . size ) ;
88+ switchOn . setAttribute ( 'for' , this . element . id )
8789 switchOff . innerHTML = this . options . offlabel ;
8890
8991 // 3: Handle
191193 else this . off ( silent ) ;
192194 }
193195 trigger ( silent ) {
196+ // TODO:
194197 //switchBtn.off('change.bs.switch');
195198 //if ( !silent ) this.element.change();
196199 //this.element.on('change.bs.switch', $.proxy(function() {
You can’t perform that action at this time.
0 commit comments