From: David Mark on 8 Dec 2009 16:50
On Dec 8, 4:07 pm, Matt Kruse <m...(a)thekrusefamily.com> wrote:
> obviously the attr() method is meant to only set string properties.
It is not set up, nor is it designed for string properties. Which of
these will check a box in jQuery?
attr(el, 'checked', true);
attr(el, 'checked', 'true');
attr(el, 'checked', '');
attr(el, 'checked', 'checked');
Bonus, in which browsers?
I've seen all of them in practice and lots of questions about this and
similar issues in the various jQuery support forums, blog posts, etc.
I know the first works for most, except for XML, which jQuery seems to
want to support with this method. See how mixing up attributes and
properties and trying to support both XML and HTML DOM's all in one
magic function has led to an interface with so many wires crossed it's
hard to predict the outcome of even one single menial line of code.
Now imagine an array of components and plug-ins built on top of this
rickety foundation. Of course, you don't have to imagine it. You've
blogged about it. Predictably, it's all a bunch of unpredictable,
Don't ask me what the other three do (or in which browsers). I'd have
to go back and look at the code again. That cannot be a good sign
when I have to read the code to predict what the thing will do to the
DOM. Where does that leave the average code monkey? In the jQuery
mailing list where nobody has a clue what is going on under the hood
of this clunker.
Glad you liked the review (as much as I could be glad about it). Now
stop using this junk. :)
From: Hans-Georg Michna on 9 Dec 2009 10:58
On Mon, 7 Dec 2009 15:20:00 -0800 (PST), David Mark wrote:
>incompatible with QSA.
>Almost every browser "supported" by jQuery _has_ QSA now anyway.
what does QSA stand for?
From: Hans-Georg Michna on 9 Dec 2009 11:19
it is really a pity. The fundamental ideas of jQuery,
particularly to use CSS selectors and a functional style of
programming, are sound, as far as I can tell, and they often
allow you to write as a one-liner, what would otherwise be half
Why is nobody writing a competing library, maybe a good subset
of jQuery, but without the foul spots? There is an obvious need
for such a critter, otherwise people wouldn't flock to jQuery,
and I wouldn't like to miss it either.
Why isn't anyone sending John Resig a big, fat set of test
From: Jake Jarvis on 9 Dec 2009 11:22
Hans-Georg Michna wrote:
> On Mon, 7 Dec 2009 15:20:00 -0800 (PST), David Mark wrote:
>> incompatible with QSA.
>> Almost every browser "supported" by jQuery _has_ QSA now anyway.
> what does QSA stand for?
From: "Michael Haufe ("TNO")" on 9 Dec 2009 12:16
On Dec 9, 10:19 am, Hans-Georg Michna <hans-
> Why is nobody writing a competing library, maybe a good subset
> of jQuery, but without the foul spots?
No doubt there are, but I think its safe to say they don't have the
same marketing and/or don't care to share.
> There is an obvious need for such a critter, otherwise people wouldn't flock to jQuery,
> and I wouldn't like to miss it either.
Define what you mean when you say "...such a critter"
> Why isn't anyone sending John Resig a big, fat set of test
Time better spent elsewhere?