Traversal
closest Searches up the DOM tree for the first element specified.
- closest( selector )
- selector Type: String Traverses up the DOM tree for each selected element and gets the first that matches the selector.
- closest( element )
- element Type: HTMLElement Traverses up the DOM tree for each selected element and gets the first that matches the element.
- closest( collection )
- collection Type: HTMLCollection Traverses up the DOM tree for each selected element and gets the first that matches any within the selector.
The eq method will return the specific element in the array and wrap it in vQuery to maintain the chain.
find Searches each selected element for any elements specified.
- find( selector )
- selector Type: String Traverses up the DOM tree for each selected element and gets the first that matches the selector.
- find( element )
- element Type: HTMLElement Traverses up the DOM tree for each selected element and gets the first that matches the element.
- find( collection )
- collection Type: HTMLCollection Traverses up the DOM tree for each selected element and gets the first that matches any within the selector.
- find( vQuery )
- vQuery Type: vQuery Each selected element is matched against each element in the vQuery stack and returned if at least one is true.
- find( arg1 [, arg2 [, argN ]] )
- arg Type: filterable ( selector / element / collection / vQuery ) Each selected element is tested by each argument and is kept if the element matches one of the arguments.
The eq method will return the specific element in the array and wrap it in vQuery to maintain the chain.
next Select the immediate following sibling on the DOM tree.
- next( selector )
- selector Type: String Traverses up the DOM tree for each selected element and gets the first that matches the selector.
- next( element )
- element Type: HTMLElement Traverses up the DOM tree for each selected element and gets the first that matches the element.
- next( collection )
- collection Type: HTMLCollection Traverses up the DOM tree for each selected element and gets the first that matches any within the selector.
- next( vQuery )
- vQuery Type: vQuery Each selected element is matched against each element in the vQuery stack and returned if at least one is true.
- next( arg1 [, arg2 [, argN ]] )
- arg Type: nextable ( selector / element / collection / vQuery ) Each selected element is tested by each argument and is kept if the element matches one of the arguments.
The eq method will return the specific element in the array and wrap it in vQuery to maintain the chain.
nextAll Selects all following siblings on the DOM tree.
- nextAll( selector )
- selector Type: String Traverses up the DOM tree for each selected element and gets the first that matches the selector.
- nextAll( element )
- element Type: HTMLElement Traverses up the DOM tree for each selected element and gets the first that matches the element.
- nextAll( collection )
- collection Type: HTMLCollection Traverses up the DOM tree for each selected element and gets the first that matches any within the selector.
- nextAll( vQuery )
- vQuery Type: vQuery Each selected element is matched against each element in the vQuery stack and returned if at least one is true.
- nextAll( arg1 [, arg2 [, argN ]] )
- arg Type: nextable ( selector / element / collection / vQuery ) Each selected element is tested by each argument and is kept if the element matches one of the arguments.
The eq method will return the specific element in the array and wrap it in vQuery to maintain the chain.
nextUntil Selects all following siblings on the DOM tree until the specified element is reached.
- nextUntil( selector )
- selector Type: String Traverses up the DOM tree for each selected element and gets the first that matches the selector.
- nextUntil( element )
- element Type: HTMLElement Traverses up the DOM tree for each selected element and gets the first that matches the element.
- nextUntil( collection )
- collection Type: HTMLCollection Traverses up the DOM tree for each selected element and gets the first that matches any within the selector.
- nextUntil( vQuery )
- vQuery Type: vQuery Each selected element is matched against each element in the vQuery stack and returned if at least one is true.
- nextUntil( arg1 [, arg2 [, argN ]] )
- arg Type: nextable ( selector / element / collection / vQuery ) Each selected element is tested by each argument and is kept if the element matches one of the arguments.
The eq method will return the specific element in the array and wrap it in vQuery to maintain the chain.
prev Selects the immediate preceding sibling on the DOM tree.
- prev( selector )
- selector Type: String Traverses up the DOM tree for each selected element and gets the first that matches the selector.
- prev( element )
- element Type: HTMLElement Traverses up the DOM tree for each selected element and gets the first that matches the element.
- prev( collection )
- collection Type: HTMLCollection Traverses up the DOM tree for each selected element and gets the first that matches any within the selector.
- prev( vQuery )
- vQuery Type: vQuery Each selected element is matched against each element in the vQuery stack and returned if at least one is true.
- prev( arg1 [, arg2 [, argN ]] )
- arg Type: nextable ( selector / element / collection / vQuery ) Each selected element is tested by each argument and is kept if the element matches one of the arguments.
The eq method will return the specific element in the array and wrap it in vQuery to maintain the chain.
prevAll Selects all predceding siblings on the DOM tree
- prevAll( selector )
- selector Type: String Traverses up the DOM tree for each selected element and gets the first that matches the selector.
- prevAll( element )
- element Type: HTMLElement Traverses up the DOM tree for each selected element and gets the first that matches the element.
- prevAll( collection )
- collection Type: HTMLCollection Traverses up the DOM tree for each selected element and gets the first that matches any within the selector.
- prevAll( vQuery )
- vQuery Type: vQuery Each selected element is matched against each element in the vQuery stack and returned if at least one is true.
- prevAll( arg1 [, arg2 [, argN ]] )
- arg Type: nextable ( selector / element / collection / vQuery ) Each selected element is tested by each argument and is kept if the element matches one of the arguments.
The eq method will return the specific element in the array and wrap it in vQuery to maintain the chain.
prevUntil Selects all preceding siblings on the DOM tree until the specified element is reached.
- prevUntil( selector )
- selector Type: String Traverses up the DOM tree for each selected element and gets the first that matches the selector.
- prevUntil( element )
- element Type: HTMLElement Traverses up the DOM tree for each selected element and gets the first that matches the element.
- prevUntil( collection )
- collection Type: HTMLCollection Traverses up the DOM tree for each selected element and gets the first that matches any within the selector.
- prevUntil( vQuery )
- vQuery Type: vQuery Each selected element is matched against each element in the vQuery stack and returned if at least one is true.
- prevUntil( arg1 [, arg2 [, argN ]] )
- arg Type: nextable ( selector / element / collection / vQuery ) Each selected element is tested by each argument and is kept if the element matches one of the arguments.
The eq method will return the specific element in the array and wrap it in vQuery to maintain the chain.
parent Selects the parent of each element.
- parent( selector )
- selector Type: String Traverses up the DOM tree for each selected element and gets the first that matches the selector.
- parent( element )
- element Type: HTMLElement Traverses up the DOM tree for each selected element and gets the first that matches the element.
- parent( collection )
- collection Type: HTMLCollection Traverses up the DOM tree for each selected element and gets the first that matches any within the selector.
- parent( vQuery )
- vQuery Type: vQuery Each selected element is matched against each element in the vQuery stack and returned if at least one is true.
- parent( arg1 [, arg2 [, argN ]] )
- arg Type: nextable ( selector / element / collection / vQuery ) Each selected element is tested by each argument and is kept if the element matches one of the arguments.
The eq method will return the specific element in the array and wrap it in vQuery to maintain the chain.
parents Selects all the parents of each element.
- parents( selector )
- selector Type: String Traverses up the DOM tree for each selected element and gets the first that matches the selector.
- parents( element )
- element Type: HTMLElement Traverses up the DOM tree for each selected element and gets the first that matches the element.
- parents( collection )
- collection Type: HTMLCollection Traverses up the DOM tree for each selected element and gets the first that matches any within the selector.
- parents( vQuery )
- vQuery Type: vQuery Each selected element is matched against each element in the vQuery stack and returned if at least one is true.
- parents( arg1 [, arg2 [, argN ]] )
- arg Type: nextable ( selector / element / collection / vQuery ) Each selected element is tested by each argument and is kept if the element matches one of the arguments.
The eq method will return the specific element in the array and wrap it in vQuery to maintain the chain.
parentsUntil Select the parents of each element until the specified element is reached.
- parentsUntil( selector )
- selector Type: String Traverses up the DOM tree for each selected element and gets the first that matches the selector.
- parentsUntil( element )
- element Type: HTMLElement Traverses up the DOM tree for each selected element and gets the first that matches the element.
- parentsUntil( collection )
- collection Type: HTMLCollection Traverses up the DOM tree for each selected element and gets the first that matches any within the selector.
- parentsUntil( vQuery )
- vQuery Type: vQuery Each selected element is matched against each element in the vQuery stack and returned if at least one is true.
- parentsUntil( arg1 [, arg2 [, argN ]] )
- arg Type: nextable ( selector / element / collection / vQuery ) Each selected element is tested by each argument and is kept if the element matches one of the arguments.
The eq method will return the specific element in the array and wrap it in vQuery to maintain the chain.
Manipulation
addClass Add the specified classes to the selected elements.
after Inserts content after the selected elements.
append Append content to the end of the selected elements.
appendTo Appends the selected elements to the targeted element.
attr Add, alter or retrieve the specified attribute values from the selected elements.
before Insert content before the selected elements.
data Add, alter or retrieve data from the selected elements.
html Alter or retrieve the html from the selected elements.
prepend prepend content to the start of the selected elements.
prependTo Inserts the selected elements to the beginning of the target element
prop Add properties or retrive the value of properties from the selected elements.
removeClass Remove the specified classes from the selected elements.
text Alter the text or retrieve the text from the selected elements.
val Alter the value or retrieve the value from the selected elements.
wrap Wrap HTML around each of the selected elements.
wrapAll Wrap HTML around all of the selected elements.
wrapInner Wrap HTML around the contents of each selected element.
Events
click
Attach an event handler to the click event.off Unattach an event handler to the an event.
on Attach an event handler to an event.
trigger Trigger the specified event on the elements.
Alteration
add Add elements to the selected elements on the chain.
addBack Add the previously selected elements before the latest traversal or alteration method.
clone Make a copy of the selected elements.
detach Remove the selected elements but keep a reference to them.
end Go back to the previously selected elements before the latest traversal method.
- end()
- This method does not accept any arguments.
The end method will select the previous stack of vQuery elements before the last traversal method was called and created a new stack. end() can be called in sequence or at any point on the chain and will counter the last reversal method.
eq Return the selected element in the array wrapped in vQuery
- eq( index )
- index Type: Integer The index of the element in the stack to be returned wrapped in vQuery.
The eq method will return the specific element in the array and wrap it in vQuery to maintain the chain.
filter Reduce the currently selected elements by checking them.
- filter( selector )
- selector Type: String A string selector that is matched against each element and is returned if true.
- filter( element )
- element Type: HTMLElement An element that is matched against each selected element and is returned if true.
- filter( collection )
- collection Type: HTMLCollection Each selected element is matched against each element in the stack and returned if at least one is true.
- filter( vQuery )
- vQuery Type: vQuery Each selected element is matched against each element in the vQuery stack and returned if at least one is true.
- filter( fn )
- fn Type: Function ( Integer index, Element element ) Each selected element is tested by a function and is kept if the function returns true.
- filter( arg1 [, arg2 [, argN ]] )
- arg Type: filterable ( selector / element / collection / vQuery / fn ) Each selected element is tested by each argument and is kept if the element matches one of the arguments.
The filter method will return the specific element in the array provided it passes the test. It is possible to use multiple arguments for the element which will return the element if it matches at least one of the arguments.