Support » Fixing WordPress » jQuery 1.9 deprecated methods ".live()" and ".browser()"

  • 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.

Viewing 3 replies - 1 through 3 (of 3 total)
  • 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.

    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()”.

    Moderator Ipstenu (Mika Epstein)


    🏳️‍🌈 Halfelf Rogue & Plugin Review Team Rep

    Closing this because we already have a trac ticket. That’s the better place to discuss this 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘jQuery 1.9 deprecated methods ".live()" and ".browser()"’ is closed to new replies.