Make WordPress Core

Ticket #22975: 22975.replace-live.patch

File 22975.replace-live.patch, 2.1 KB (added by ocean90, 10 years ago)
  • wp-admin/js/inline-edit-tax.js

     
    88                t.type = $('#the-list').attr('data-wp-lists').substr(5);
    99                t.what = '#'+t.type+'-';
    1010
    11                 $('.editinline').live('click', function(){
     11                $('#the-list').on('click', 'a.editinline', function(){
    1212                        inlineEditTax.edit(this);
    1313                        return false;
    1414                });
  • wp-admin/js/tags.js

     
    11jQuery(document).ready(function($) {
    22
    3         $('.delete-tag').live('click', function(e){
     3        $('#the-list').on('click', '.delete-tag', function(e){
    44                var t = $(this), tr = t.parents('tr'), r = true, data;
    55                if ( 'undefined' != showNotice )
    66                        r = showNotice.warn();
  • wp-admin/js/inline-edit-post.js

     
    4242                });
    4343
    4444                // add events
    45                 $('a.editinline').live('click', function(){
     45                $('#the-list').on('click', 'a.editinline', function(){
    4646                        inlineEditPost.edit(this);
    4747                        return false;
    4848                });
  • wp-admin/js/post.js

     
    349349                        return false;
    350350                });
    351351
    352                 $('#' + taxonomy + 'checklist li.popular-category input[type="checkbox"], #' + taxonomy + 'checklist-pop input[type="checkbox"]').live( 'click', function(){
     352                $('#' + taxonomy + 'checklist, #' + taxonomy + 'checklist-pop').on( 'click', 'li.popular-category input[type="checkbox"], input[type="checkbox"]', function() {
     353                        console.log('fired');
    353354                        var t = $(this), c = t.is(':checked'), id = t.val();
    354355                        if ( id && t.parents('#taxonomy-'+taxonomy).length )
    355356                                $('#in-' + taxonomy + '-' + id + ', #in-popular-' + taxonomy + '-' + id).prop( 'checked', c );