I was wondering why jquery would not automatically do a browser sniff, and fall back to methods that non-supported browsers understand. Instead of me doing the browser checking, why doesn't jquery do this for me?
For example, something like this within the show, or animate methods: if ( $.browser.safari && parseFloat($.browser.version) < 2 ) { var theobj = document.getElementById("showlayer"); theobj.style.display = "block"; } Would this browser sniffing significantly increases file size? Is this the reason why jquery does not do this? Regards Richard On Aug 30, 2:42 am, "Brandon Aaron" <[EMAIL PROTECTED]> wrote: > The Safari version is actually the WebKit build number. Which is 413 for > Safari 2. > > -- > Brandon Aaron > > On 8/29/07, Karl Rudd <[EMAIL PROTECTED]> wrote: > > > > > If you're using jQuery 1.1.3 or later you can test for the version of > > Safari really easily: > > > if ( $.browser.safari && parseFloat($.browser.version) < 2 ) { > > // Do stuff for Safari version < 2 > > } > > > Karl Rudd > > > On 8/29/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > I love jquery, the only issue I have is the non-graceful degradation > > > of some methods with mainly Safari Ver < 2. > > > I understand this browser is outdated, and perhaps the worst browser > > > out there, but my colleagues at work still use it. > > > If some of the features of jquery are not available for safari 1x, why > > > not make it degrade gracefully? > > > For instance, I want to show() a division layer, that has set > > > display:none. > > > If safari 1x does not support the opacity effects, then why not > > > degrade to simply changing the container style to display:block, > > > instead of returning and doing nothing? > > > I think this would be a great advantage if jquery could do this, i > > > would like to know why jquery does not support "graceful degradation". > > > Thank you for any comments.