- Timestamp:
- 01/07/12 20:17:43 (5 months ago)
- File:
-
- 1 edited
-
trunk/inc/js/jquery.webForms.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/inc/js/jquery.webForms.js
r15798 r15845 15 15 $('.bx-switcher-cont', this).each(function() { 16 16 var eSwitcher = $(this); 17 var eInput = $(this).find('input'); 17 18 18 19 if (eSwitcher.hasClass('bx-form-switcher-processed')) … … 26 27 $this.removeClass('on').addClass('off'); 27 28 } else { 29 $this.removeClass('off').addClass('on'); 28 30 $this.find('input').attr('checked', 'checked').trigger('change'); 29 $this.removeClass('off').addClass('on');30 31 } 31 32 return false; 33 }); 34 35 eInput.on('enable', function () { 36 if ('checked' != $(this).attr('checked')) { 37 console.log('onEnable'); 38 $(this).attr('checked', 'checked').trigger('change'); 39 } 40 if (!eSwitcher.hasClass('on')) 41 eSwitcher.removeClass('off').addClass('on'); 42 }); 43 44 eInput.on('disable', function () { 45 if (undefined != $(this).attr('checked')) { 46 console.log('onDisable'); 47 $(this).removeAttr('checked').trigger('change'); 48 } 49 if (!eSwitcher.hasClass('off')) 50 eSwitcher.removeClass('on').addClass('off'); 32 51 }); 33 52 });
Note: See TracChangeset
for help on using the changeset viewer.