Ok this is untested but use conditional comments to hide the scripts
from IE 5.5 and lower, but shown to IE 6+ and the rest of the browsers
you'll need to use this somewhat messy approach.
!--[if gte IE 6] ... scripts ... ![endif]--
!--[if !IE]-- ... scripts ... !--![endif]--
You need to include
On 3/6/07, Oliver Boermans [EMAIL PROTECTED] wrote:
Is there a reasonably
straight forward method I could employ to lock out IE5 out of jQuery
altogether?
jQuery(document).ready(function() {
if( /MSIE [1-5]/.test(navigator.userAgent ) return;
// rest of init code goes here;
});
All of
Oliver Boermans schrieb:
Clever and almost perfect.
IE 6 is rendering -- visibly in the page.
Thanks Klaus!
On 06/03/07, Klaus Hartl [EMAIL PROTECTED] wrote:
Why don't you make it the other way round?
!--[if gte IE 6]--
script type=text/javascript src=jquery.js/script
!--![endif]--
Thanks Klaus and Aaron,
Unfortunately in the site I am working on the JavaScript is broken up
into a number of files so I would need to make extensive changes to
prevent jQuery being called in IE5.x.
Instead I've made changes to ensure there are no problems regardless
of whether the scripts work
IE 5.5 appears to have partial or intermittent support for my jQuery
scripts. Although full support would be great - I would prefer IE5.x
didn't run my scripts at all than partially. Is there a reasonably
straight forward method I could employ to lock out IE5 out of jQuery
altogether?
On
Perhaps a little JavaScript inserted with a conditional comment in the
head of my document?
!--[if lt IE 6]
script type=text/javascript
//Kill jQuery?
...
/script
![endif]--
Thoughts?
On 06/03/07, Oliver Boermans [EMAIL PROTECTED] wrote:
IE 5.5 appears to have partial or intermittent support
Oliver Boermans schrieb:
Perhaps a little JavaScript inserted with a conditional comment in the
head of my document?
!--[if lt IE 6]
script type=text/javascript
//Kill jQuery?
...
/script
![endif]--
Thoughts?
Why don't you make it the other way round?
!--[if gte IE 6]--
script
As is IE 7.
If I remove -- it my JavaScript is also hidden from Firefox and friends :/
On 06/03/07, Oliver Boermans [EMAIL PROTECTED] wrote:
IE 6 is rendering -- visibly in the page.
___
jQuery mailing list
discuss@jquery.com
You could cheat and put something like this before the main jQuery code.
if ( /MSIE [1-5]/.test(navigator.userAgent) )
jQuery = false;
This works because the main jQuery code is surrounded with:
if(typeof window.jQuery == undefined) { }
You would have to make sure the
Try:
!--[if gte IE 6]
script type=text/javascript src=jquery.js/script
![endif]--
Karl Rudd
On 3/6/07, Oliver Boermans [EMAIL PROTECTED] wrote:
As is IE 7.
If I remove -- it my JavaScript is also hidden from Firefox and friends :/
On 06/03/07, Oliver Boermans [EMAIL PROTECTED] wrote:
IE
Err scratch that, last reponse of mine. That will hide it from every
non-IE browser as well as IE 6.
Karl Rudd
On 3/6/07, Karl Rudd [EMAIL PROTECTED] wrote:
Try:
!--[if gte IE 6]
script type=text/javascript src=jquery.js/script
![endif]--
Karl Rudd
On 3/6/07, Oliver Boermans [EMAIL
On 09/10/06, Brian Miller [EMAIL PROTECTED] wrote:
Sam, if that's a problem with your user base, then there are issues that
go beyond the technical. If my users were that hackish and black-hatted,
I wouldn't be giving them any front-end code at all if I could avoid it.
I mean, if people are
There's always the Ultimate Browser Sniffer. The most updated version
does involve some object detection, but mostly still chops up the user
agent string. It also detects the version of JS.
http://www.webreference.com/tools/browser/javascript.html
View source on the page to see the current
Currently, jQuery does a browser detect by checking the user agent.
However, I think object detection would probably be a better way.
This code does that by detecting unique obects on the window object.
However, I am not sure what is unique to Safari.
// Figure out what browser is being used
I'm inclined to disagree.
I believe that one should use object detection for cases in which they are
invoking that object for it's functionality. A prime example is the XHR
(although MS may be messing around with that in IE7).
But, if one is best served by simply knowing what browser we are
On 09/10/06, Brian Miller [EMAIL PROTECTED] wrote:
I'm inclined to disagree.
I believe that one should use object detection for cases in which they are
invoking that object for it's functionality. A prime example is the XHR
(although MS may be messing around with that in IE7).
But, if one
People that know how to change their user agent string will most
likely know the possible results of doing so. I don't buy into the
notion that we have lots of people changing their user agent string.
--
Brandon Aaron
On 10/9/06, Sam Collett [EMAIL PROTECTED] wrote:
On 09/10/06, Brian Miller
Sam, if that's a problem with your user base, then there are issues that
go beyond the technical. If my users were that hackish and black-hatted,
I wouldn't be giving them any front-end code at all if I could avoid it.
I mean, if people are technically savvy enough to change their user agent
.
Subject: Re: [jQuery] jQuery Browser Detection
I'm inclined to disagree.
I believe that one should use object detection for cases in which they are
invoking that object for it's functionality. A prime example is the XHR
(although MS may be messing around with that in IE7).
But, if one is best
Aren't there cases though where the browser tells you the incorrect string?
For example, I believe that older versions of IE for Mac said that they were
actually a different browser than they really were. The AOL browser also
does this same thing I think.
Fortunately, neither of those
20 matches
Mail list logo