WordPress.org

Ready to get started?Download WordPress

Forums

WP-Ajaxify-Comments
[resolved] jQuery 1.8.0 issue with dead .live function (5 posts)

  1. tzdk
    Member
    Posted 1 year ago #

    Just in case you missed that, .live is removed from new 1.8.0 version http://blog.jquery.com/2012/08/09/jquery-1-8-released/

    So because of the 1 .live you use plugin does not work with 1.8.0 - yet ;)

    There could be more but .live one I can spot.

    http://wordpress.org/extend/plugins/wp-ajaxify-comments/

  2. janjonas
    Member
    Plugin Author

    Posted 1 year ago #

    Hi tzdk,

    thanks for your comment. I don't think jQuery's live() was removed in 1.8.0; you're right: The function is deprecated, but it still exists.

    As you can see here http://jsfiddle.net/SHCdW/ live() exists in jQuery 1.8.0 and calls internally the new on() method.

    Nevertheless I've added a new release 0.5.4 that uses the recommended on() and delegate() methods if they are available.

    Please leave me a message if your problem was not solved in the most recent release.

    Regards,
    Jan

  3. tzdk
    Member
    Posted 1 year ago #

    Thanks. Hmm, well your plugin seems to run with it gone! But yeah should not really matter now I see what you did on fiddle and double check internet statements. We will see how much of an issue this is when WordPress 3.5 arrives, .live is still in heavy use.

    This is jQuery speaking in November 2011

    .live() and .die(): We continue to get many bug reports and see user confusion regarding the quirks of the .live() method. Common issues are now documented on its updated API page. We strongly advise the use of .on() or .delegate() for new code, since they are better APIs. Given its widespread use it’s unlikely we will remove this API in 1.8, but please do update your code as soon as possible.

    http://blog.jquery.com/2011/11/08/building-a-slimmer-jquery/

  4. tzdk
    Member
    Posted 1 year ago #

    Forgot to say that I am still a bit skeptical towards .live in 1.8 vs. WP plugins. Some weird issues, like with http://www.themezilla.com/plugins/zillashortcodes/ which make use of .live. Plugin not avail. on .org site but if that is activated your fully jQuery 1.8 compatible plugin does not work on 1.8!

    No JS errors, there is just no message displayed. BlockUI issue then? There is a bit of smooth scrolling going on so not dead. Or is this because ThemeZilla code make use of .live -> .on fix like you fiddled?

    Using 1.7.2 and no problems. Both work. Can make one go hmmm :) I am thinking general issue, dont particulary care for that plugin.

    I tried BlockUI 2.43 which is 0.01 newer than the one currently used by your plugin. No difference.

    On another test site using scripts with .live stuff and jQuery 1.8 your plugin also does not work. My first reply was almost stating your fix did not work but it does, just not under some conditions - like with scripts using .live - or something. Or is it even your fix that is a problem? Not good to report "errors" without even seeing anything in JS error console, make no sense really - but I remain skeptical to it all... I kind of hope you say OH I see! and here is a new fix because if general jQuery .live vs new 1.8 issue that is bad.

  5. tzdk
    Member
    Posted 1 year ago #

    WP inline-edit you can get from here http://wordpress.org/extend/plugins/wp-inline-edit/ not some outsider you have to sign up for :)

    Try that with yours. Messages dissapear yet no JS errors. Each work fine on their own and inline also with Ajaxify Comments.

    And of course inline use .live :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic