utility $

Description

  • $ #

    $(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 the passed element.

    Takes in an arbitrary number of arguments. Returns one Element if given one argument; otherwise returns an array of Elements.

    All elements returned by the function are "extended" with Element instance methods.