I guess this really is a hard concept to get across after all. Ok, so there's browser feature detection with .support.
So imagine the thing I'm talking about works like this: alert( $('ul li:first-child').support ); alerts 'true' if Firefox, but alerts 'false' if IE6. I'm not trying use the selectors to do styling, I'm trying to use the selectors to detect browser capability. On Feb 9, 2:50 pm, MorningZ <morni...@gmail.com> wrote: > Are you *sure* that parent > child doesn't work in IE6? > > I could see that this CSS declaration, and pretty sure it doesn't work > > ul > li { > color: blue; > > } > > but part of the magic of jQuery (and other libraries) is that it takes > that into account already..... and saying $("ul > li") should work no > matter what (supported) browser it runs on > > On Feb 9, 5:33 pm,Geuis<geuis.te...@gmail.com> wrote: > > > I think my question was misunderstood. I'm not asking about detecting > > browser versions. > > > I want to test if the current browser has native support for a > > particular kind of CSS selector. My previous example was the :first- > > child pseudo selector that isn't supported in IE6, but is supported in > > most other browsers. Another example would be "ul > li", which selects > > only "li" elements that are immediate children of a ul. > > > Anyone have some ideas on how this could be implemented? > > > On Feb 9, 7:16 am, Aaron Gundel <aaron.gun...@gmail.com> wrote: > > > > jQuery.browser is deprecated in 1.3 + (don't use it). > > > > JQuery now uses feature detection. This is a more extensible way of > > > detecting which browser is being utilized. > > > > See the following page for more > > > details...http://docs.jquery.com/Utilities/jQuery.support > > > > On Mon, Feb 9, 2009 at 4:02 AM, Mohd.Tareq <tareq.m...@gmail.com> wrote: > > > > > HiGeuis, > > > > > Ther is a function with alias ($.browser) it will gives u functionality > > > > to > > > > identify browser name > > > > like this $.browser.mozilla , $.browser.msie , $.browser.opera , > > > > $.browser.safari. > > > > & if u wana return the version of browser , then u have use below > > > > function > > > > $.browser.version it will return version of current browser according > > > > to ur > > > > problem ie6 u can add css on the fly. > > > > > hope this will work . > > > > > cheers & cioa > > > > > On Mon, Feb 9, 2009 at 11:47 AM,Geuis<geuis.te...@gmail.com> wrote: > > > > >> I'm working on a project where I need to detect if the browser > > > >> natively supports a given CSS selector. > > > > >> For example, if I am using the selector 'ul li:first-child', this is > > > >> supported by IE7, FF, and Safari but not by IE6 and below. Is there a > > > >> way that I can test that selector to see if the current browser > > > >> supports it? A feature that returns a simple boolean status would be > > > >> awesome. > > > > > -- > > > > ---| Regard |--- > > > > > Mohd.Tareque