.previousSibling()
Fetches the previous HTML sibling element in the DOM
Returns
Example 1
Previous HTML sibling element of #box2 is #box1 div which will be selected while using .previousSibling() on #box2
JS
HTML
$.domLoaded(function() { //box1 == $.get("#box1").element(); var box1 = $.get("#box2").previousSibling(); }); | |||||