Miscellaneous Methods

forEach Method:

The forEach method iterates through an array of items like a for loop. 

main selector flags: all, odd, even, single, and, range

Parameters

param 1: A function that outputs the result of the loop, the function takes two arguments, "o" is the loop object giving details about the loop content and the second parameter "i" is the loop's iteration number - which can also be accessed in the loop's object.

ajax Method:

The ajax method performs ajax requests.

main selector flags: none

Parameters

param 1 (object):

method: String value "GET" or "POST" requests

url: String value of the file that performs the ajax request

data: String value of the data to send to the file performing the request

param 2: The function that gets the ajax response. This function takes one argument "x" which will output an object which contains the response text and the json.

param 3: Boolean value, if a form data object is being used then this parameter must be set to false, as this parameter enables request headers.

is Method:

The is method holds an array of values and matches those values against what is passed into the main query selector.

main selector flags: none

It can also be used to detect specified key codes

Parameters

The is method takes an infinite number of arguments, they can be string arguments or numbers.