HomeHelpTrac

Changeset 15718 for trunk/inc


Ignore:
Timestamp:
12/01/11 00:20:03 (6 months ago)
Author:
Alexander Trofimov
Message:

Forms - switcher

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/inc/js/jquery.webForms.js

    r15689 r15718  
    1212        $(this).addNonWebForms(); 
    1313         
     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; 
     24        }); 
     25 
    1426        // collapsable headers  
    1527        $('.bx-form-collapsable', this).each(function() { 
     
    161173})(jQuery); 
    162174 
     175$(document).ready(function() { 
     176    $(this).addWebForms(); 
     177}); 
     178 
Note: See TracChangeset for help on using the changeset viewer.