Reputation: 282885
On the selectors page, it says @
is one of the meta-characters. But what does it do?
Upvotes: 9
Views: 136
Reputation: 35860
It was for XPath selectors, of which support for has been dropped.
Upvotes: 1
Reputation: 186562
It was formerly used to grab an attribute, eg [@href]
but it's no longer valid and would throw Syntax error, unrecognized expression: [@href]
as of 1.3+
Upvotes: 3
Reputation: 630419
It used to be used in the attribute selectors, but that's no longer the case as of jQuery 1.3+. From the attribute selector docs:
Note: In jQuery 1.3
[@attr]
style selectors were removed (they were previously deprecated in jQuery 1.2). Simply remove the“@”
symbol from your selectors in order to make them work again.
Upvotes: 7