Skip to main content

Bug Tracker

Side navigation

#13214 closed bug (notabug)

Opened January 15, 2013 07:50AM UTC

Closed January 15, 2013 12:28PM UTC

Last modified February 08, 2013 02:22PM UTC

Chrome ' Cannot read property 'msie'' @ JQuery 1.9.0

Reported by: anonymous Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: git
Keywords: dbr Cc:
Blocked by: Blocking:
Description

When I using <script type = "text/javascript" src = "http://code.jquery.com/jquery-latest.min.js"></script> ( 1.9.0 )

if get error form Google Chrome by using ----> $.browser.msie

(Uncaught TypeError: Cannot read property 'msie' of undefined)

The Full Code :

function pageHeight(){

if($.browser.msie){

return document.compatMode == "CSS1Compat"? document.documentElement.clientHeight :

document.body.clientHeight;

}else{

return self.innerHeight;

}

};

Attachments (0)
Change History (11)

Changed January 15, 2013 08:24AM UTC by averywu.tw@gmail.com comment:1

Firefox 18 and Safari 5.1.7 @ Mac OSX 10.6.8 works

Changed January 15, 2013 08:37AM UTC by anonymous comment:2

Nice to see I'm not alone.

Changed January 15, 2013 09:18AM UTC by BillsGate comment:3

Same problem here:

Chrome Version 23.0.1271.97 m

Plugin: Fancybox (http://fancyapps.com/fancybox)

Changed January 15, 2013 09:20AM UTC by danneame@gmail.com comment:4

$.fn.browser is removed in jQuery 1.9 - it won't work in any browser. You can use jquery migrate to patch it back in, but consider using feature detection rather than browser sniffing

Changed January 15, 2013 12:28PM UTC by dmethvin comment:5

resolution: → notabug
status: newclosed

As Dan name says, $.browser is gone in 1.9.0.

It is not a good idea to use jquery-latest in a production site. It is meant mostly for testing.

Changed January 17, 2013 04:16AM UTC by anonymous comment:6

Removing the "browser" property was STUPID. Does anyone remember why jQuery was created in the first place? Wasn't it something about an API that worked in all browsers? Is it really features we're testing for? What about quirks? C'mon fuck-heads, seriously???!!!!

Changed January 17, 2013 01:29PM UTC by gibson042 comment:7

keywords: → dbr

Changed January 19, 2013 06:41AM UTC by jQua?? comment:8

looks like SOMEone missed their nappy time!

.browser() has been deprecated since jQuery 1.3.

i'm sure there was a reason for removing .browser(), but it's unfortunate that MANY of the best jQuery plugins still use it recent releases of their code:

fancyBox, tablesorter, chosen, Uniform, SuperFish, abeautifulsite.net's alert dialogues ...

:(

Changed January 31, 2013 11:50PM UTC by dmethvin comment:9

#13366 is a duplicate of this ticket.

Changed February 08, 2013 12:45PM UTC by gorostas comment:10

So my using of the link:

http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js

in my projects for wordpress is as stupid?!?

I have scripts that use 'browser' property and now I have 34 websites with errors and got stack on homepage?

Can you please give it back, so I do not need manualy go to everypage and use old local jquery files?

thanks

Changed February 08, 2013 02:22PM UTC by ajpiano comment:11

Yes, it is considered unwise to use the /1/ link - all of your sites will be upgraded to the latest version of jQuery 1.x every time it's updated. This "unexpected" upgrade, coupled with the poor caching of the /1/ urls, means that it is strongly discouraged to use anything other than a link to a full version (1.9.0, for instance). Sorry that you have to go update many websites, but there is nothing for us to "give back" and the structure of the URLs on the Google/MS CDNs isn't going to change, so that is the only resolution here.

To all else reading this thread: please do not use it to post "me too" responses or ask us to "just put back" jQuery.browser. Thanks.