Skip to content

Commit

Permalink
jquery core: closes #3034. Ids with '-' weren't handled by quickExpr.
Browse files Browse the repository at this point in the history
  • Loading branch information
flesler committed Jun 13, 2008
1 parent fa48ad1 commit 2f2602e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ var jQuery = window.jQuery = window.$ = function( selector, context ) {

// A simple way to check for HTML strings or ID strings
// (both of which we optimize for)
var quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/,
var quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,

// Is it a simple selector
isSimple = /^.[^:#\[\.]*$/,
Expand Down

0 comments on commit 2f2602e

Please sign in to comment.