mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-22 14:35:07 +00:00
Optimize jQuery selector for checkbox synchronization. props SergeyBiryukov. see #24136.
git-svn-id: http://core.svn.wordpress.org/trunk@24116 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d334db7d4d
commit
45096e8f3b
@ -371,8 +371,8 @@ jQuery(document).ready( function($) {
|
||||
|
||||
$('#new' + taxonomy).keypress( function(event){
|
||||
if( 13 === event.keyCode ) {
|
||||
event.preventDefault();
|
||||
$('#' + taxonomy + '-add-submit').click();
|
||||
event.preventDefault();
|
||||
$('#' + taxonomy + '-add-submit').click();
|
||||
}
|
||||
});
|
||||
$('#' + taxonomy + '-add-submit').click( function(){ $('#new' + taxonomy).focus(); });
|
||||
@ -409,7 +409,7 @@ jQuery(document).ready( function($) {
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#' + taxonomy + 'checklist, #' + taxonomy + 'checklist-pop').on( 'click', 'input[type="checkbox"]', function() {
|
||||
$('#' + taxonomy + 'checklist, #' + taxonomy + 'checklist-pop').on( 'click', 'li.popular-category > label input[type="checkbox"]', function() {
|
||||
var t = $(this), c = t.is(':checked'), id = t.val();
|
||||
if ( id && t.parents('#taxonomy-'+taxonomy).length )
|
||||
$('#in-' + taxonomy + '-' + id + ', #in-popular-' + taxonomy + '-' + id).prop( 'checked', c );
|
||||
|
Loading…
x
Reference in New Issue
Block a user