# Wednesday, 03 October 2012
« Getting started with Mercurial for a sma... | Main | Upgrading an MVC4 Visual Studio 2010 Sol... »

I upgraded a project recently from 1.7.2 of jQuery to 1.8.2 and began testing my pages.  On one of my pages I was getting the following error:

unrecognized expression

Doing a little research I discovered that in the 1.8 release of jQuery they deprecated the :radio and other such pseudo-class selectors.  The preferred method moving forward is to use the equivalent CSS selector of [type=radio].

Here’s the jQuery 1.8 release notes and the ticket describing this change.

Why the removal?

From their radio selector page under the Additional Notes section:

Because :radio is a jQuery extension and not part of the CSS specification, queries using :radio cannot take advantage of the performance boost provided by the native DOM querySelectorAll() method. For better performance in modern browsers, use [type="radio"] instead.

And from the ticket page:

Deprecate (for eventual removal) the input type selectors: :file :image :password :radio :reset :submit :text -- They are basically aliases to [type="file"] [type="image"] but can't use querySelectorAll - I think having these selectors around in the long term future is entirely unnecessary and confusing.

Happy Coding! Smile

:radio | 1.8 | jQuery
Posted 10.03.2012  #    Comments [3]  |