Back

Types

Selector

Used to select specific nodes within a document

(See full documentation on Selectors)

".classname"
"#id"
"div"

etc...

Context

Search for nodes only inside of the provided context

(Can be any valid Selector)

Content

Content that can be inserted into a document

Can be an Element, a String of HTML markup from which new elements can be created, a Function that returns valid Content, or an Array of any of the above

document.createElement('div')
'<div>'
function(){ return '<div>'; }
[document.createElement('div'), '<div>']

String

A set of characters

"abc_123"

Number

Numerical values including integers and decimals

123
-123.456
0

Integer

Whole-number values (can be positive, negative, or zero)

123
-123
0

Boolean

True or false

true
false

Object

A collection of key:value pairs

{
    a: 123,
    b: "apple",
    c: [1,2,3],
    d: function(){}
}

Array

A list of items

[
    "alpha",
    "bravo",
    "charlie",
    123,
    true
]

Function

An object that can be invoked to perform some operation and return some value

function(){
    // do something
    return -1;
}