JQLite is both a function and an array-like data structure for manipulation of DOM, linking elements to expando cache, and execution of chains of functions.

Constructors

  • JQLite is both a function and an array-like data structure for manipulation of DOM, linking elements to expando cache, and execution of chains of functions.

    Parameters

    • element:
          | string
          | Node
          | Window
          | NodeList
          | Node[]
          | JQLite
          | ArrayLike<Element>
          | (() => void)

    Returns JQLite

Properties

length: number = 0
prototype: {
    length: number;
    eq(index: any): JQLite;
    toString(): string;
}

Methods

  • Return instance of controller attached to element

    Parameters

    • Optionalname: string

      Controller name

    Returns any

  • Parameters

    • key: any

      The key (as a string) to get/set or an object for mass-setting.

    • Optionalvalue: any

      The value to set. If not provided, the function acts as a getter.

    Returns any

    • The retrieved data if acting as a getter. Otherwise, returns undefined.
  • Remove all child nodes of the set of matched elements from the DOM and clears CACHE data, associated with the node.

    Returns JQLite

    The current instance of JQLite.

  • Gets or sets innerHTML on the first element in JQLite collection

    Parameters

    • Optionalvalue: string

    Returns any

  • Gets or sets data on a parent element

    Parameters

    • name: string
    • Optionalvalue: any

    Returns any

  • Removes an event listener to each element in JQLite collection.

    Parameters

    • type: string

      The event type(s) to remove listener from

    • Optionalfn: Function

      The function to remove from event type.

    Returns JQLite

  • Adds an event listener to each element in the JQLite collection.

    Parameters

    • type: string

      The event type(s) to listen for. Multiple event types can be specified, separated by a space.

    • fn: Function

      The function to execute when the event is triggered.

    Returns JQLite

    The JQLite collection for chaining.

  • Remove data by name from cache associated with each element in JQLite collection.

    Parameters

    • name: string

      The key of the data associated with element

    Returns JQLite

  • Get the combined text contents of each element in the JQLite collection or set the text contents of all elements.

    Parameters

    • Optionalvalue: string

    Returns string | JQLite

  • TODO: REMOVE! This function being used ONLY in tests!

    Parameters

    • event: any
    • extraParameters: any

    Returns JQLite

  • Gets or sets the values of form elements such as input, select and textarea in a JQLite collection.

    Parameters

    • value: any

    Returns any