# Class JQLite

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.

#### Param: element

#### Returns

- Defined in shared/jqlite/jqlite.js:68
- Defined in shared/jqlite/jqlite.js:103

#####
Index

### Constructors

constructor

### Properties

length
prototype

### Methods

after
append
attr
children
controller
data
detach
elements
empty
eq
find
html
inheritedData
injector
isolateScope
off
on
parent
prepend
remove
removeData
replaceWith
scope
text
toString
triggerHandler
val

##
Constructors

### constructor

- new JQLite(element): JQLite

- 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

  - Defined in shared/jqlite/jqlite.js:68

##
Properties

### length

length: number = 0

- Defined in shared/jqlite/jqlite.js:116

### `Static` prototype

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

- Defined in shared/jqlite/jqlite.js:103

##
Methods

### after

- after(newElement): JQLite

- #### Parameters

  - newElement: string

  #### Returns JQLite

  - Defined in shared/jqlite/jqlite.js:557

### append

- append(node): JQLite

- #### Parameters

  - node: string | JQLite

  #### Returns JQLite

  - Defined in shared/jqlite/jqlite.js:516

### attr

- attr(name, value): any

- #### Parameters

  - name: any
  - value: any

  #### Returns any

  - Defined in shared/jqlite/jqlite.js:403

### children

- children(): JQLite

- #### Returns JQLite

  - Defined in shared/jqlite/jqlite.js:500

### controller

- controller(name?): any

- Return instance of controller attached to element

  #### Parameters

  - `Optional` name: string

    Controller name

  #### Returns any

  - Defined in shared/jqlite/jqlite.js:181

### data

- data(key, value?): any

- #### Parameters

  - key: any

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

  - `Optional` value: 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.
  - Defined in shared/jqlite/jqlite.js:453

### detach

- detach(): JQLite

- #### Returns JQLite

  - Defined in shared/jqlite/jqlite.js:588

### elements

- elements(): Element[]

- #### Returns Element[]

  - Defined in shared/jqlite/jqlite.js:122

### empty

- empty(): JQLite

- 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.

  - Defined in shared/jqlite/jqlite.js:135

### eq

- eq(index): JQLite

- #### Parameters

  - index: any

  #### Returns JQLite

  - Defined in shared/jqlite/jqlite.js:112

### find

- find(selector): any

- #### Parameters

  - selector: any

  #### Returns any

  - Defined in shared/jqlite/jqlite.js:617

### html

- html(value?): any

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

  #### Parameters

  - `Optional` value: string

  #### Returns any

  - Defined in shared/jqlite/jqlite.js:328

### inheritedData

- inheritedData(name, value?): any

- Gets or sets data on a parent element

  #### Parameters

  - name: string
  - `Optional` value: any

  #### Returns any

  - Defined in shared/jqlite/jqlite.js:311

### injector

- injector(): InjectorService

- Return instance of injector attached to element

  #### Returns InjectorService

  - Defined in shared/jqlite/jqlite.js:189

### isolateScope

- isolateScope(): Scope

- Returns the isolate `$scope` of the element.

  #### Returns Scope

  - Defined in shared/jqlite/jqlite.js:169

### off

- off(type, fn?): JQLite

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

  #### Parameters

  - type: string

    The event type(s) to remove listener from

  - `Optional` fn: Function

    The function to remove from event type.

  #### Returns JQLite

  - Defined in shared/jqlite/jqlite.js:251

### on

- on(type, fn): 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.

  - Defined in shared/jqlite/jqlite.js:200

### parent

- parent(): any

- #### Returns any

  - Defined in shared/jqlite/jqlite.js:596

### prepend

- prepend(node): JQLite

- #### Parameters

  - node: string | JQLite

  #### Returns JQLite

  - Defined in shared/jqlite/jqlite.js:540

### remove

- remove(keepData?): JQLite

- #### Parameters

  - `Optional` keepData: boolean = false

  #### Returns JQLite

  - Defined in shared/jqlite/jqlite.js:580

### removeData

- removeData(name): JQLite

- 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

  - Defined in shared/jqlite/jqlite.js:297

### replaceWith

- replaceWith(arg1): JQLite

- #### Parameters

  - arg1: any

  #### Returns JQLite

  - Defined in shared/jqlite/jqlite.js:479

### scope

- scope(): Scope

- Returns the `$scope` of the element.

  #### Returns Scope

  - Defined in shared/jqlite/jqlite.js:157

### text

- text(value?): string | JQLite

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

  #### Parameters

  - `Optional` value: string

  #### Returns string | JQLite

  - Defined in shared/jqlite/jqlite.js:345

### toString

- toString(): string

- #### Returns string

  - Defined in shared/jqlite/jqlite.js:104

### triggerHandler

- triggerHandler(event, extraParameters): JQLite

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

  #### Parameters

  - event: any
  - extraParameters: any

  #### Returns JQLite

  - Defined in shared/jqlite/jqlite.js:644

### val

- val(value): any

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

  #### Parameters

  - value: any

  #### Returns any

  - Defined in shared/jqlite/jqlite.js:374