WordPress.org

Ready to get started?Download WordPress

Forums

[closed] jQuery 1.9 deprecated methods ".live()" and ".browser()" (4 posts)

  1. Lwangaman
    Member
    Posted 1 year ago #

    I use the latest jQuery 1.9 on my WordPress / Buddypress enabled website, but the latest jQuery has deprecated some methods, such as ".live()" and ".browser()" in favour of ".on()" and ".support()" respectively, and this breaks some of the javascripts of both Buddypress and WordPress (namely, "buddypress/bp-themes/bp-default/_inc/global.js" and "wp-includes/js/admin-bar.js" (or "wp-includes/js/admin-bar.min.js").
    It would probably be a good idea to update these in the next release.

  2. jhned
    Member
    Posted 1 year ago #

    Yeah, we kinda need to update this as soon as possible. I've had to comment in 2 plugin forums already as well, and I'm sure there are others out there that are using "live." This is probably causing a lot of hair-pulling right now.

  3. Lwangaman
    Member
    Posted 1 year ago #

    Removing the "$.browser" method isn't quite so simple, because using "$.support()" is a whole other concept. I noticed that "$.browser()" is used to construct the admin bar, and specifically targets mozilla. In fact I am getting continuously the following message in my chrome inspector tools when I hover over the admin-bar items:
    Uncaught TypeError: Cannot read property 'mozilla' of undefined ---- admin-bar.min.js:1
    It will be necessary to target the specific functionality of mozilla that is different from other browsers in order to use "$.support()".

  4. Closing this because we already have a trac ticket. That's the better place to discuss this :)

    http://core.trac.wordpress.org/ticket/22975

Topic Closed

This topic has been closed to new replies.

About this Topic