D
David Mark
That's a false over-generalization. If you are trying to be super
accessible and all that, sure, don't hide things by default. But
internal webapps rarely have those types of concerns.
That is ridiculous. If you declare a display:none rule in CSS,
expecting to override it with script, you have just committed the
textbook accessibility blunder of creating a document that is
unreadable with script. Hard to imagine as the jQuery definition of
progressive enhancement applies only to script or no script (there is
no middle ground to be had.)
So, you are new to browser scripting and you define such a rule in CSS
and use:
el.style.display = '';
Oops, doesn't work. Now the aspiring author knows he/she has taken a
wrong turn. So they remove the CSS rule and now they may have FoUC,
which is simple enough to deal with (and a good lesson to learn.)
Now, you propose to call some ridiculous, ever-changing function that
requires computed styles, expandos, etc. *and* allows the beginner to
gloss right over a critical and crucial to understand blunder.
I think it's fairly common, actually. Click on a row to expand
"details" below it in another row.
So, use this:
el.style.display = '';
Simple, concise, one line, works in virtually every UA ever released,
doesn't change meaning over time, etc. Why, you could even
encapsulate that line in a function, perhaps asigning it only if:
typeof document.documentElement.style.display == 'string';
Now you know how to hide/show elements only if it is possible to do so
(some agents can't do it.) I'll leave the FoUC line as an exercise.
Perspective, I guess. In some areas it's growing.
Everything is history at some point. I hope .NET dies out sooner
rather than later. But that doesn't change the fact that it's built by
a huge company, has lots of devoted developers who swear by it, is the
back-bone of mission-critical webapps and web sites, and must satisfy
a need for a huge number of people, even if you think it is horrible.
Sounds a lot like jQuery (s/huge company/ninja/).
People still use dial-up?
As you've been told, *lots* of people use dial-up. You know those
people with iPhones? Those are on dial-up at least some of the time.
Depending on the country and demographic, a significant percentage of
your prospective audience may be on dial-up. Broadband is expensive
in some areas. And regardless of the specific bandwidth or size of
the scripts involved, wasted time on worthless scripts means less time
for content.
I don't think I did? I did make a comment on an existing ticket, and I
posted suggestions to the dev mailing list, referencing the thread
here.
Whatever, the point is that the natives tore it down as an affront to
their idol. It would be more useful to add a balancing criticism
section to the jQuery Wikipedia entry. The current entry is an
infomercial. Certainly there are enough sources at this point to back
up a contrary view.
What's the point of an object that gathers DOM element references,
just to run them through a broken - each - conveyor to sputtering
grinders called attr, removeAttr, show, etc. You really expect
anything useful (or even predictable) to come of that, after all we
have seen in the last week?
And, as you well know, the big selling point for the wannabe are the
"plugins":
http://groups.google.com/group/jque...ead/583e8446e4bfc365/3743f9a2d354733c?lnk=gst
Just skip to the last message. They are re-enacting the year 2000 in
2009.
Sure, if by "book" you mean "pdf file" and by "buy" you mean "download
for free".
I was referring to those jQuery books which should now be moved to the
fiction section. Who would buy such a thing now?