Christof Donat schrieb:
> Hi,
> 
>> Mozilla added document.all if I remember correctly. And so on...
> 
> You can use document.all with Mozilla, but if(document.all) ... else ... 
> still 
> choses the else path.
> 
> It is opera that has problems with it - I trapped into it. To detect IE 
> (which 
> is >90% of what I need) I now use conditional compilation which of course is 
> not necessarily future proof, but at the moment it is one of the best 
> possible methods to at least detect IE.
> 
>> I think using navigator.vendor is a good idea, because that string
>> cannot be changed by a user (or at least not as easy as the user agent
>> string). But not every browser has that.
> 
> Well, that doesn't keep you from doing something like this:
> 
> /[EMAIL PROTECTED]
> @if ( @_jscript )
>       ... //here is the IE
> @else */
> if( !navigator.vendor ) {
>       ... // use the userAgent string here
> } else switch(navigator.vendor) {
>       case '...':...
>       ...
> }
> /* @end
> @*/
> 
> Christof

Christof,

Conditional Compilation is my first choice too, but it cannot be used if 
you want to compress the script. Thats why I switched that in my plugins 
  a while ago.


-- Klaus





_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to