best practice with attribute selector question

1 view
Skip to first unread message

David Serduke

unread,
Oct 5, 2007, 5:19:52 PM10/5/07
to jQuery Documents
It seems like both of these work

$("div[id='person']").show();
$("div[@id='person']").show();

which one should we advocate in the docs?

david

Karl Swedberg

unread,
Oct 5, 2007, 5:24:50 PM10/5/07
to jquer...@googlegroups.com
Hi David,

The [@attribute] syntax (XPath) is deprecated in 1.2. It still works, but it shouldn't be promoted. We should instead urge people to use the [attribute] syntax (CSS).


--Karl
_________________
Karl Swedberg


David Serduke

unread,
Oct 5, 2007, 5:57:01 PM10/5/07
to jQuery Documents
Gotcha. Thanks for answer.

David

Reply all
Reply to author
Forward
0 new messages