MCPcopy Index your code
hub / github.com/prototypejs/prototype / $

Function $

src/prototype/dom/dom.js:73–83  ·  view source on GitHub ↗

section: DOM, related to: Element * $(id) -> Element * $(id...) -> [Element...] * - id (String | Element): A DOM node or a string that references a node's * ID. * * If provided with a string, returns the element in the document with * matching ID; otherwise returns t

(element)

Source from the content-addressed store, hash-verified

71 * for more info.
72 **/
73 function $(element) {
74 if (arguments.length > 1) {
75 for (var i = 0, elements = [], length = arguments.length; i < length; i++)
76 elements.push($(arguments[i]));
77 return elements;
78 }
79
80 if (Object.isString(element))
81 element = document.getElementById(element);
82 return Element.extend(element);
83 }
84
85 GLOBAL.$ = $;
86

Callers 15

assertions.jsFile · 0.85
info_IE6Function · 0.85
test_helpers.jsFile · 0.85
enumerable.test.jsFile · 0.85
event.test.jsFile · 0.85
assertContentFunction · 0.85
ajax.test.jsFile · 0.85
position.test.jsFile · 0.85
selector.test.jsFile · 0.85
object.test.jsFile · 0.85

Calls

no outgoing calls

Tested by 3

assertContentFunction · 0.68
isDisplayedFunction · 0.68
getInnerHTMLFunction · 0.68