Stop using jQuery.live(). props ocean90. see #22975.

git-svn-id: https://develop.svn.wordpress.org/trunk@23444 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2013-02-16 17:46:12 +00:00
parent 746187f768
commit b17b5a64e3
4 changed files with 4 additions and 4 deletions

View File

@ -42,7 +42,7 @@ inlineEditPost = {
}); });
// add events // add events
$('a.editinline').live('click', function(){ $('#the-list').on('click', 'a.editinline', function(){
inlineEditPost.edit(this); inlineEditPost.edit(this);
return false; return false;
}); });

View File

@ -8,7 +8,7 @@ inlineEditTax = {
t.type = $('#the-list').attr('data-wp-lists').substr(5); t.type = $('#the-list').attr('data-wp-lists').substr(5);
t.what = '#'+t.type+'-'; t.what = '#'+t.type+'-';
$('.editinline').live('click', function(){ $('#the-list').on('click', 'a.editinline', function(){
inlineEditTax.edit(this); inlineEditTax.edit(this);
return false; return false;
}); });

View File

@ -349,7 +349,7 @@ jQuery(document).ready( function($) {
return false; return false;
}); });
$('#' + taxonomy + 'checklist li.popular-category input[type="checkbox"], #' + taxonomy + 'checklist-pop input[type="checkbox"]').live( 'click', function(){ $('#' + taxonomy + 'checklist, #' + taxonomy + 'checklist-pop').on( 'click', 'li.popular-category input[type="checkbox"], input[type="checkbox"]', function() {
var t = $(this), c = t.is(':checked'), id = t.val(); var t = $(this), c = t.is(':checked'), id = t.val();
if ( id && t.parents('#taxonomy-'+taxonomy).length ) if ( id && t.parents('#taxonomy-'+taxonomy).length )
$('#in-' + taxonomy + '-' + id + ', #in-popular-' + taxonomy + '-' + id).prop( 'checked', c ); $('#in-' + taxonomy + '-' + id + ', #in-popular-' + taxonomy + '-' + id).prop( 'checked', c );

View File

@ -1,6 +1,6 @@
jQuery(document).ready(function($) { jQuery(document).ready(function($) {
$('.delete-tag').live('click', function(e){ $('#the-list').on('click', '.delete-tag', function(e){
var t = $(this), tr = t.parents('tr'), r = true, data; var t = $(this), tr = t.parents('tr'), r = true, data;
if ( 'undefined' != showNotice ) if ( 'undefined' != showNotice )
r = showNotice.warn(); r = showNotice.warn();