Bug Tracker

Opened 10 years ago

Closed 10 years ago

#13003 closed bug (notabug)

Error in Selector raises exception $('$something')

Reported by: [email protected] Owned by:
Priority: undecided Milestone: None
Component: selector Version: 1.8.3
Keywords: Cc:
Blocked by: Blocking:


jQuery is raising an error when using selectors which say $('$something'), instead of $('#something').

I know in this case the code itself is broken, but I am wondering whether jQuery is supposed to raise an error in this case or not.

jsFiddle: http://jsfiddle.net/xbhM4/

Change History (1)

comment:1 Changed 10 years ago by gibson042

Component: unfiledselector
Resolution: notabug
Status: newclosed

jQuery intentionally raises exceptions on invalid selectors to make it finding and correcting broken code easier.

Note: See TracTickets for help on using tickets.