#13214 closed bug (notabug)
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;
}
};
Change History (11)
comment:1 Changed 11 years ago by
comment:3 Changed 11 years ago by
Same problem here: Chrome Version 23.0.1271.97 m Plugin: Fancybox (http://fancyapps.com/fancybox)
comment:4 Changed 11 years ago by
$.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
comment:5 Changed 11 years ago by
Resolution: | → notabug |
---|---|
Status: | new → closed |
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.
comment:6 Changed 11 years ago by
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???!!!!
comment:7 Changed 11 years ago by
Keywords: | dbr added |
---|
comment:8 Changed 11 years ago by
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 ...
:(
comment:10 Changed 11 years ago by
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
comment:11 Changed 11 years ago by
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.
Firefox 18 and Safari 5.1.7 @ Mac OSX 10.6.8 works