jQuery 1.9 has deprecated methods ".live()" and ".browser()" (3 posts)

  1. John D'Orazio
    Posted 3 years ago #

    I already posted this in the "How To and Troubleshooting" section, but it's probably more appropriate here in the feedback area as a bug request... So sorry for the duplicate post...

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

  2. You posted here: http://core.trac.wordpress.org/ticket/22975

    That was the right place :)

    For now? Don't use 1.9, it's not supported yet.

  3. John D'Orazio
    Posted 3 years ago #

    Yes I posted on the trac right after I posted here, cause I started thinking "there must be a trac for wordpress", so I googled it, found it, found an already opened issue and contributed to it. Had I known before about the trac I wouldn't have posted here and in the other section...

Topic Closed

This topic has been closed to new replies.

About this Topic