• Resolved hashtoken

    (@hashtoken)


    This is in reference to the use of jQuery’s deprecated/removed .live() event handler attachment method. The .live method has been removed from jQuery since v1.9.

    JavaScript File: awpqsfscript.js
    Line 8:

    $('.pagievent').live('click', function(e) {
    ...
    });

    should instead use the .on() event equivalent:

    $(document).on('click', '.pagievent', function(e) {
    ...
    });

    It would be more efficient to attach this to a wrapper (with an ID) a little closer to the .pagievent element but attaching it to the document will at least cover every usage scenario and has no worst performance than .live().

    I’ve only just started using this plugin but it looks great, so thanks for all the hard work.

    One other small criticism:
    The informal language used in some of the admin notices, such as

    No Ajax WP Query Search Filter Form found, dude.

    comes across as unprofessional. It would make it difficult for me to include this plugin for any of my clients (though I’d like to). I don’t mean to come off as snobby, but do we really need the “dude”, dude? 😉

    http://wordpress.org/plugins/ajax-wp-query-search-filter/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter hashtoken

    (@hashtoken)

    I just noticed 5 other uses of .live() used in “admin/scripts/admin_awqsfjs.js” that I thought I’d also point out…

    $('.closex').live('click', function() {...
    $('.addTaxo').live('click',function() {...
    $('.addCmf').live('click',function() {...
    $('.genv').live('click',function() {...
    $('.remove_row').live('click',function(e) {

    would be

    $(document).on('click', '.closex', function(e) {...
    $(document).on('click', '.addTaxo', function(e) {...
    $(document).on('click', '.addCmf', function(e) {...
    $(document).on('click', '.genv', function(e) {...
    $(document).on('click', '.remove_row', function(e) {...
    Plugin Author TC.K

    (@wp_dummy)

    You are right, I forgot to change the .live to .on on the last update. Will update it in next update.

    As for the ‘Dude’ problem, you can easily change it to something else with a ajax_wpqsf_reoutput() filter.

    Thread Starter hashtoken

    (@hashtoken)

    Perfect. Thank you TC.K

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Use of deprecated(1.7) / removed(1.9) .live() method’ is closed to new replies.