Make WordPress Core

Changeset 24116


Ignore:
Timestamp:
04/27/2013 12:19:45 PM (11 years ago)
Author:
ocean90
Message:

Optimize jQuery selector for checkbox synchronization. props SergeyBiryukov. see #24136.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/js/post.js

    r24059 r24116  
    372372        $('#new' + taxonomy).keypress( function(event){
    373373            if( 13 === event.keyCode ) {
    374                  event.preventDefault();
    375                  $('#' + taxonomy + '-add-submit').click();
     374                event.preventDefault();
     375                $('#' + taxonomy + '-add-submit').click();
    376376            }
    377377        });
     
    410410        });
    411411
    412         $('#' + taxonomy + 'checklist, #' + taxonomy + 'checklist-pop').on( 'click', 'input[type="checkbox"]', function() {
     412        $('#' + taxonomy + 'checklist, #' + taxonomy + 'checklist-pop').on( 'click', 'li.popular-category > label input[type="checkbox"]', function() {
    413413            var t = $(this), c = t.is(':checked'), id = t.val();
    414414            if ( id && t.parents('#taxonomy-'+taxonomy).length )
Note: See TracChangeset for help on using the changeset viewer.