- Timestamp:
- 12/05/11 23:07:45 (6 months ago)
- File:
-
- 1 edited
-
trunk/inc/js/jquery.webForms.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/inc/js/jquery.webForms.js
r15718 r15725 12 12 $(this).addNonWebForms(); 13 13 14 $('.bx-switcher-cont').live('click', function() { 15 var $this = $(this); 16 if ($this.hasClass('on')) { 17 $this.find('input').removeAttr('checked').trigger('change'); 18 $this.removeClass('on').addClass('off'); 19 } else { 20 $this.find('input').attr('checked', 'checked').trigger('change'); 21 $this.removeClass('off').addClass('on'); 22 } 23 return false; 14 // switchers 15 $('.bx-switcher-cont', this).each(function() { 16 var eSwitcher = $(this); 17 18 if (eSwitcher.hasClass('bx-form-switcher-processed')) 19 return; 20 eSwitcher.addClass('bx-form-switcher-processed'); 21 22 eSwitcher.on('click', function() { 23 var $this = $(this); 24 if ($this.hasClass('on')) { 25 $this.find('input').removeAttr('checked').trigger('change'); 26 $this.removeClass('on').addClass('off'); 27 } else { 28 $this.find('input').attr('checked', 'checked').trigger('change'); 29 $this.removeClass('off').addClass('on'); 30 } 31 return false; 32 }); 24 33 }); 25 34
Note: See TracChangeset
for help on using the changeset viewer.