. $ () Live (function () {}); and jQuery.browser undefined in jquery 1.9.0

$().live(function(){}); and jQuery.browser - undefined in jQuery 1.9.0

If I use jQuery 1.8.3 instead of jquery 1.9.0, it works fine in my project.

And what are the functions of undefined and why?

0
jquery
Jan 22 '13 at 12:25
source share
5 answers

Read the jQuery update guide , in version 1.9 they removed all obsolete methods from previous releases. But they provided a migration plugin to help developers during the migration period.

jQuery.live was deprecated in v1.7.0 in favor of jQuery.on , please use this in your code.

You can enable the migrate plugin

+9
Jan 22 '13 at 12:28
source share

The live function is irrelevant, you should use on instead of live

+2
Jan 22 '13 at 12:27
source share

.live() been removed: http://api.jquery.com/live/ . Use .on() : http://api.jquery.com/on/ :

.browser() also been removed: http://api.jquery.com/jQuery.browser/

+2
Jan 22 '13 at 12:28
source share

These features are deprecated in jquery 1.9.0

+1
Jan 22 '13 at 12:26
source share

Because they are out of date!

instead of .live() you should use . on ()

jQuery.browser

Returns: PlainObjectversion deprecated: 1.3, deleted: 1.9

Description. Contains flags for useragent read from navigator.userAgent. We do not recommend using this property; try using function detection instead (see jQuery.support). jQuery.browser may be ported to the plugin in a future version of jQuery.

+1
Jan 22 '13 at 12:27
source share



All Articles