Skip to content

Get rid of jQuery.live #33

Closed
rickard2 opened this Issue May 29, 2013 · 3 comments

2 participants

@rickard2
Owner

In 3.6 JQMIGRATE says:

JQMIGRATE: jQuery.fn.live() is deprecated

WordPress version requirement is now at 3.0 which means jQuery v1.4.2 (http://core.trac.wordpress.org/browser/tags/3.0/wp-includes/js/jquery/jquery.js), jQuery.fn.on() was added in 1.7 (http://api.jquery.com/on/)

What's the preferred way of event handling that was added in 1.4 and is not deprecated in 1.9/2.0?

@rickard2 rickard2 was assigned May 29, 2013
@larsemil

I was about to say .on(), but I can see now why that would not work. Did not read properly.

.delegate() was my choice until i started using .on()

could that be the way to go?
http://api.jquery.com/delegate/

it also says:

As of jQuery 1.7, .delegate() has been superseded by the .on() method. For earlier versions, however, it remains > the most effective means to use event delegation.

@rickard2
Owner

delegate seems to be the way to go, thanks!

@rickard2
Owner

Fixed in 2.4-dev branch

@rickard2 rickard2 closed this Aug 26, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.