$().live(function(){}); and jQuery.browser is undefined in jquery 1.9.0 [closed]
Asked Answered
I

5

1

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

If I user jQuery 1.8.3 instead of jquery 1.9.0 it is working fine in my project.

And what are the functions undefined and why?

Intercalary answered 22/1, 2013 at 12:25 Comment(5)
You would have noticed by reading the release notes for 1.9Holarctic
was documented in the release notes: blog.jquery.com/2013/01/15/…Ignace
i did not noticed the release notes for 1.9. i am use nuget in my project it has replace old jquery to new and changed the file path. i noticed bug in firebug it was undefined.Intercalary
In my project plugins need jQuery.browser. so that it is not working...Intercalary
move back to your old jquery version..Clearwing
K
8

Please read the jQuery upgrade Guide, in 1.9 release they have removed all the deprecated methods from previous releases. But they have provided a migration plugin to help the developers during the migration period.

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

You can include the migrate plugin

Kilpatrick answered 22/1, 2013 at 12:28 Comment(5)
i can use jquery-1.9.0 by adding migrate plugin also. so that it will work?Intercalary
yes, But I wouldn't recommend it for new code. it is very easy to convert themKilpatrick
k.. many jquery plugins are compressed file. so that only it is unable convert them...Intercalary
any site or software is there for converting compressed min file to normal file js and vise versa?Intercalary
Ok, if there are third party plugin dependencies, it is better to use the migration plugin for the time beingKilpatrick
A
2

The live function is deprecate you have to use on instead of live

Abnaki answered 22/1, 2013 at 12:27 Comment(0)
B
2

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

.browser() has been removed as well: http://api.jquery.com/jQuery.browser/

Biltong answered 22/1, 2013 at 12:28 Comment(0)
I
1

These functions are deprecated in jquery 1.9.0

Ironmonger answered 22/1, 2013 at 12:26 Comment(0)
C
1

Because they are deprecated!

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

jQuery.browser

Returns: PlainObjectversion deprecated: 1.3, removed: 1.9

Description: Contains flags for the useragent, read from navigator.userAgent. We recommend against using this property; please try to use feature detection instead (see jQuery.support). jQuery.browser may be moved to a plugin in a future release of jQuery.

Clearwing answered 22/1, 2013 at 12:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.