#6881 closed bug (invalid)
Some valid selectors throw a syntax error when passed to jQuery.fn.is()
Reported by: | elijahr | Owned by: | |
---|---|---|---|
Priority: | Milestone: | 1.4.3 | |
Component: | traversing | Version: | 1.4.2 |
Keywords: | focus, is, | Cc: | |
Blocked by: | Blocking: |
Description (last modified by )
var input; input = $('input').eq(0); try {
input.is(':focus');
} catch(e) { /* "Syntax error, unrecognized expression: Syntax error, unrecognized expression: focus" */ }
try {
input.is(':hover');
} catch(e) { /* "Syntax error, unrecognized expression: Syntax error, unrecognized expression: hover" */ }
Change History (2)
comment:1 Changed 13 years ago by
Description: | modified (diff) |
---|---|
Resolution: | → invalid |
Status: | new → closed |
comment:2 Changed 13 years ago by
It's working using jQuery('foo:hover'), so I wonder whether it's supported or not.
Note: See
TracTickets for help on using
tickets.
Neither
:focus
nor:hover
are supported selectors in jQuery. The complete list of supported selectors is here:http://api.jquery.com/category/selectors/