views:

90

answers:

3

On the selectors page, it says @ is one of the meta-characters. But what does it do?

+6  A: 

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.

Nick Craver
+3  A: 

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+

meder
+1  A: 

It was for XPath selectors, of which support for has been dropped.

Eli Grey