jquery core: closes #3034. Ids with '-' weren't handled by quickExpr.

This commit is contained in:
Ariel Flesler 2008-06-13 18:42:54 +00:00
parent fa48ad1d1b
commit 2f2602ed15

View file

@ -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 = /^.[^:#\[\.]*$/,