MCPcopy Create free account
hub / github.com/JsAaron/jQuery / quickParse

Function quickParse

1.7/event.js:13–22  ·  view source on GitHub ↗
( selector )

Source from the content-addressed store, hash-verified

11 rmouseEvent = /^(?:mouse|contextmenu)|click/,
12 rquickIs = /^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,
13 quickParse = function( selector ) {
14 var quick = rquickIs.exec( selector );
15 if ( quick ) {
16 // 0 1 2 3
17 // [ _, tag, id, class ]
18 quick[1] = ( quick[1] || "" ).toLowerCase();
19 quick[3] = quick[3] && new RegExp( "(?:^|\\s)" + quick[3] + "(?:\\s|$)" );
20 }
21 return quick;
22 },
23 quickIs = function( elem, m ) {
24 return (
25 (!m[1] || elem.nodeName.toLowerCase() === m[1]) &&

Callers 1

event.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected