[jQuery] Re: Feature Detection Best Practice?
On Feb 16, 2:13 am, Klaus Hartl klaus.ha...@googlemail.com wrote: It's false in IE because it tests for use of the 'opacity' style, not whether the browser has opacity support. Since IE uses filters to achieve opacity this results in a false value. I think it makes sense when you think of it that way. Sure. Although I would have called the property something like $.support.CSS3Opacity or $.support.W3COpacity etc... I still think it's confusing. --Klaus I would think that opacity or boxModel would mean the W3C version of it.
[jQuery] Re: Feature Detection Best Practice?
I thought that was the point of $.support - If it doesn't support the standard implementation, then it's false. On Feb 14, 8:46 pm, Klaus Hartl klaus.ha...@googlemail.com wrote: On 14 Feb., 20:31, Chris cpot...@siolon.com wrote: On Feb 13, 2:34 am, Klaus Hartl klaus.ha...@googlemail.com wrote: That will not avoid IE's ClearType issue, since IE is supporting opacity and you still end up in the else branch. I think it's one of he rare cases where you need to do browser sniffing. I don't think there's a way to find out, if the ClearType issue is happening or not. It doesn't go in the else branch for IE 6/7 actually. It works as I intend. IE 8 however does go in the else branch. Interesting. I assumed $.support.opacity would be true in IE since it does support it, even though not as standard CSS3 property. --Klaus
[jQuery] Re: Feature Detection Best Practice?
On 15 Feb., 20:59, Ricardo Tomasi ricardob...@gmail.com wrote: I thought that was the point of $.support - If it doesn't support the standard implementation, then it's false. Probably you're right. I had just a different interpretation... I would still be confused that this value is false in IE, although if I'd use fadeIn/fadeOut it'll work. --Klaus
[jQuery] Re: Feature Detection Best Practice?
I thought that was the point of $.support - If it doesn't support the standard implementation, then it's false. Probably you're right. I had just a different interpretation... I would still be confused that this value is false in IE, although if I'd use fadeIn/fadeOut it'll work. It's false in IE because it tests for use of the 'opacity' style, not whether the browser has opacity support. Since IE uses filters to achieve opacity this results in a false value. I think it makes sense when you think of it that way. Mike
[jQuery] Re: Feature Detection Best Practice?
It's false in IE because it tests for use of the 'opacity' style, not whether the browser has opacity support. Since IE uses filters to achieve opacity this results in a false value. I think it makes sense when you think of it that way. Sure. Although I would have called the property something like $.support.CSS3Opacity or $.support.W3COpacity etc... I still think it's confusing. --Klaus
[jQuery] Re: Feature Detection Best Practice?
On Feb 13, 2:34 am, Klaus Hartl klaus.ha...@googlemail.com wrote: That will not avoid IE's ClearType issue, since IE is supporting opacity and you still end up in the else branch. I think it's one of he rare cases where you need to do browser sniffing. I don't think there's a way to find out, if the ClearType issue is happening or not. It doesn't go in the else branch for IE 6/7 actually. It works as I intend. IE 8 however does go in the else branch.
[jQuery] Re: Feature Detection Best Practice?
Are you saying that IE changes its UA string depending on whether ClearType is enabled or not? No.
[jQuery] Re: Feature Detection Best Practice?
On 14 Feb., 20:31, Chris cpot...@siolon.com wrote: On Feb 13, 2:34 am, Klaus Hartl klaus.ha...@googlemail.com wrote: That will not avoid IE's ClearType issue, since IE is supporting opacity and you still end up in the else branch. I think it's one of he rare cases where you need to do browser sniffing. I don't think there's a way to find out, if the ClearType issue is happening or not. It doesn't go in the else branch for IE 6/7 actually. It works as I intend. IE 8 however does go in the else branch. Interesting. I assumed $.support.opacity would be true in IE since it does support it, even though not as standard CSS3 property. --Klaus
[jQuery] Re: Feature Detection Best Practice?
On Feb 13, 5:34 pm, Klaus Hartl klaus.ha...@googlemail.com wrote: That will not avoid IE's ClearType issue, since IE is supporting opacity and you still end up in the else branch. I think it's one of he rare cases where you need to do browser sniffing. I don't think there's a way to find out, if the ClearType issue is happening or not. Are you saying that IE changes its UA string depending on whether ClearType is enabled or not? -- Rob
[jQuery] Re: Feature Detection Best Practice?
That seems like a good use to me! --John On Thu, Feb 12, 2009 at 10:21 PM, Chris cpot...@siolon.com wrote: I ventured into feature detection, and I want to make sure I'm doing this the right way. Basically the fx on the jQuery UI tabs causes aliasing in IE 6/7 (but not 8). Instead of checking for those browsers the old way I thought this is the right way. if (!$.support.opacity) { $(.ui-tabs ul).tabs(); } else { $(.ui-tabs ul).tabs({ fx : { height: 'toggle', opacity: 'toggle' } }); }
[jQuery] Re: Feature Detection Best Practice?
On Feb 13, 1:30 pm, John Resig jere...@gmail.com wrote: That seems like a good use to me! I notice that when defining jQuery.support (around line 3012) a script element is added as a child of the HTML element. While modern browsers seem to tolerate that, it is invalid HTML. Is there any reason why it isn't added as the first child of the head, which is a valid location for it? -- Rob
[jQuery] Re: Feature Detection Best Practice?
That will not avoid IE's ClearType issue, since IE is supporting opacity and you still end up in the else branch. I think it's one of he rare cases where you need to do browser sniffing. I don't think there's a way to find out, if the ClearType issue is happening or not. --Klaus On 13 Feb., 04:21, Chris cpot...@siolon.com wrote: I ventured into feature detection, and I want to make sure I'm doing this the right way. Basically the fx on the jQuery UI tabs causes aliasing in IE 6/7 (but not 8). Instead of checking for those browsers the old way I thought this is the right way. if (!$.support.opacity) { $(.ui-tabs ul).tabs(); } else { $(.ui-tabs ul).tabs({ fx : { height: 'toggle', opacity: 'toggle' } }); }