Changeset 25753


Ignore:
Timestamp:
11/29/13 14:41:03 (6 years ago)
Author:
plg
Message:

optimized jQuery (thanks to mistic100)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/themes/smartpocket/admin/admin.tpl

    r25752 r25753  
    1313jQuery(document).ready(function() { 
    1414  jQuery('form li label input[type=checkbox]').change(function() { 
    15     var graphicalCheckbox = jQuery(this).parent().find('.graphicalCheckbox'); 
    16     if (jQuery(this).is(':checked')) { 
    17       jQuery(graphicalCheckbox).removeClass('icon-check-empty').addClass('icon-check'); 
    18     } 
    19     else { 
    20       jQuery(graphicalCheckbox).removeClass('icon-check').addClass('icon-check-empty'); 
    21     } 
     15    jQuery(this).prev().toggleClass('icon-check icon-check-empty'); 
    2216  }); 
    2317}); 
Note: See TracChangeset for help on using the changeset viewer.