From: David Mark on
On Dec 8, 4:07 pm, Matt Kruse <m...(a)thekrusefamily.com> wrote:

[...]

For example,
> 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,
ever-shifting rubbish.

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
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.

David,

what does QSA stand for?

Hans-Georg
From: Hans-Georg Michna on
David,

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
a page of JavaScript code.

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
cases?

Hans-Georg
From: Jake Jarvis on
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.
>
> David,
>
> what does QSA stand for?
>
> Hans-Georg

querySelectorAll
http://www.w3.org/TR/selectors-api/#nodeselector

--
Jake Jarvis
From: "Michael Haufe ("TNO")" on
On Dec 9, 10:19 am, Hans-Georg Michna <hans-
georgNoEmailPle...(a)michna.com> wrote:
>
> 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
> cases?

Time better spent elsewhere?