4 ms·
One can always argue "you're doing it wrong". People say the same about ror and perl. But in my experience, even with a good mvc and object model, and world-cla
by aristus 16y ago
One can always argue "you're doing it wrong". People say the same about ror and perl. But in my experience, even with a good mvc and object model, and world-class folks, complex applications in jquery tend to become hard to maintain. I believe part of the reason is the tight coupling of state and events to the DOM.
I'm also very skeptical of the dozen-odd undocumented "extensions" to the selector language. They are useful, but tend to tie you to jQueryisms. I didn't realize for a long time that :first was not valid CSS3.
- shadowpwner 16y ago:first-of-type is valid CSS3, though.
- xtian 16y agoAnd :first-child is valid CSS2.1.
- catshirt 16y agoit's documented here http://api.jquery.com/first-selector/ http://api.jquery.com/first-selector/
- aristus 16y agoUndocumented as in "we included it in our 'CSS3-compliant selector engine' but do not mention anywhere that it is not actually part of the CSS3 spec, just something we thought was cool".
- freakwit 16y agohttp://api.jquery.com/category/selectors/ http://api.jquery.com/category/selectors/ "Borrowing from CSS 1–3, and then adding its own, jQuery offers a powerful set of tools for matching a set of elements in a document."
- aristus 16y agoYes, you've found the five-word phase that mentions that there are extensions in the selector engine. There is no documentation on which things are, or are, not, extensions. Now that we've gone all the way down the pedantry slide, have you anything of value to contribute, or was that it?
- freakwit 16y agoYou're being disingenuous here. Anybody looking for information about jQuery's selectors will google "jquery selectors" and find that five-word phrase front and center. Or take a look at the jQuery front page and hover over "CSS3 Compliant" to see "Supports CSS 1-3 selectors and more!". If you want to pick on something that claims compatibility, try Sizzle itself - http://sizzlejs.com/ http://sizzlejs.com/. In that case, you'll find a summary of alterations right at the top of its documentation https://github.com/jquery/sizzle/wiki https://github.com/jquery/sizzle/wiki .