I'm building my first page using ANY jQuery UI. I have set up an Accordion Widget, and I would like to be able to hide or disable one of the lower headers in it based on some actions in an upper one. Also, to re-enable based on the same sort of thing.
I know how to detect the action that should trigger this to fire a function, but I don't know how, within the jQuery UI system, to hide (with animation would be nice) or disable (with dimming or something would be nice, but not expandable in any case) one of the headers in the Accordion.
It's a CSS3 selector. You can use it in jQuery selectors, native API selection, and CSS style sheets.
If for some reason you can't use CSS3 (you're working on something for the US Navy, using Windows XP, doh!) jQuery has the :eq() extension. It is ONLY usable in jQuery selectors - not as CSS selection in a style sheet, etc.
:eq(3) is easier to write. I don't know which one is more performant. :eq() has the simplicity of simply selecting one element from a list of selected elements. nth-of-type() has the advantage of only selecting a single element in the first place. And performance is not likely an issue here.
Just be aware of the limitations of jQuery selector extensions - they can only be used as jQuery selectors as they are not real pseudo-selectors.