Methods
# (inner) concat(…args) → {jLight}
Concats a collection with other collections.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
args |
jLight | string | HTMLElement | HTMLCollection | NodeList | Array.<(jLight|string|HTMLElement|HTMLCollection|NodeList)> |
<repeatable> |
The elements to apply to the function. |
- Tutorials:
Returns:
jLight collection
- Type
- jLight
# (inner) each(callback) → {jLight}
[DEPRECATED] Runs a function on each of the collections elements.
Parameters:
Name | Type | Description |
---|---|---|
callback |
iteratorCallback | The function to apply to each element |
- Tutorials:
Returns:
jLight collection
- Type
- jLight
# (inner) every(callback) → {boolean}
Whether every one of the collections elements meets the conditon.
Parameters:
Name | Type | Description |
---|---|---|
callback |
iteratorBooleanCallback | The elements to supply to the function |
- Tutorials:
Returns:
If the conditon is met
- Type
- boolean
# (inner) filter(callbackOrSelector) → {jLight}
Gets a filtered jLight collection based on the input.
Parameters:
Name | Type | Description |
---|---|---|
callbackOrSelector |
string | iteratorCallback | The selector to filter the collection by or a custom function to decide which elements to filter out |
- Tutorials:
Returns:
jLight collection
- Type
- jLight
# (inner) find(?selector) → {jLight}
Gets a jLight collection from the collections children elements matching the selector.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
selector |
string |
<optional> |
The selector to use for matching elements |
- Tutorials:
Returns:
jLight collection
- Type
- jLight
# (inner) forEach(callback) → {jLight}
Runs a function on each of the collections elements.
Parameters:
Name | Type | Description |
---|---|---|
callback |
iteratorCallback | The function to apply to each element |
- Tutorials:
Returns:
jLight collection
- Type
- jLight
# (inner) includes($elements) → {boolean}
Whether the collections elements include at least one of elements.
Parameters:
Name | Type | Description |
---|---|---|
$elements |
jLight | string | HTMLElement | HTMLCollection | NodeList | The elements to supply to the function |
- Tutorials:
Returns:
If the conditon is met
- Type
- boolean
# (inner) indexOf($elements) → {number}
Gets the given elements index inside the collection.
Parameters:
Name | Type | Description |
---|---|---|
$elements |
jLight | string | HTMLElement | HTMLCollection | NodeList | The elements to supply to the function |
- Tutorials:
Returns:
The resulting number
- Type
- number
# (inner) lastIndexOf($elements) → {number}
Gets the given elements last index inside the collection.
Parameters:
Name | Type | Description |
---|---|---|
$elements |
jLight | string | HTMLElement | HTMLCollection | NodeList | The elements to supply to the function |
- Tutorials:
Returns:
The resulting number
- Type
- number
# (inner) map(callback) → {jLight}
Maps a collection.
Parameters:
Name | Type | Description |
---|---|---|
callback |
mapInnerCallback | The function used for mapping |
- Tutorials:
Returns:
jLight collection
- Type
- jLight
# (inner) pop() → {jLight}
Pops the last element from the collection.
- Tutorials:
Returns:
jLight collection
- Type
- jLight
# (inner) push(…args) → {number}
Pushes elements to the collection.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
args |
jLight | string | HTMLElement | HTMLCollection | NodeList |
<repeatable> |
The elements to apply to the function. |
- Tutorials:
Returns:
The collections new length
- Type
- number
# (inner) reduce(callback, ?initialValue) → {*}
Reduces a collection.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
reduceInnerCallback | The function used for reduction | |
initialValue |
* |
<optional> |
The initial value used for reduction |
- Tutorials:
Returns:
The reduction result
- Type
- *
# (inner) reverse() → {jLight}
Reverses a collection.
- Tutorials:
Returns:
jLight collection
- Type
- jLight
# (inner) shift() → {jLight}
Shifts a collection.
- Tutorials:
Returns:
jLight collection
- Type
- jLight
# (inner) slice(?start, ?end) → {jLight}
Slices the collection.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
start |
number |
<optional> |
The index to start the slicing |
end |
number |
<optional> |
The index to end the slicing |
- Tutorials:
Returns:
jLight collection
- Type
- jLight
# (inner) some(callback) → {boolean}
Whether at least one of the collections elements meets the conditon.
Parameters:
Name | Type | Description |
---|---|---|
callback |
iteratorBooleanCallback | The elements to supply to the function |
- Tutorials:
Returns:
If the conditon is met
- Type
- boolean
# (inner) sort(compareFunction) → {jLight}
Sorts a collection.
Parameters:
Name | Type | Description |
---|---|---|
compareFunction |
compareCallback | The function used for sorting |
- Tutorials:
Returns:
jLight collection
- Type
- jLight
# (inner) splice(start, ?deleteCount) → {jLight}
Splices the collection
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
start |
number | The index to start the splicing | |
deleteCount |
number |
<optional> |
The count of elements to delete |
- Tutorials:
Returns:
jLight collection
- Type
- jLight
# (inner) unshift(…args) → {number}
Unshifts a collection.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
args |
jLight | string | HTMLElement | HTMLCollection | NodeList |
<repeatable> |
The elements to apply to the function. |
- Tutorials:
Returns:
The collections new length
- Type
- number