Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

jquery prev

// The prev() method returns the previous sibling element of the selected element.
jQuery(li['class="foo"']).prev()

// some related methods:
jQuery(selector).prevAll() // returns all previous sibling elements of the selected element
jQuery(selector).prevUntil() // returns all previous sibling elements between two given arguments
 
PREVIOUS NEXT
Tagged: #jquery #prev
ADD COMMENT
Topic
Name
8+3 =