Element
- absolutize
- addClassName
- addMethods
- adjacent
- ancestors
- childElements
- classNames
- cleanWhitespace
- clonePosition
- cumulativeOffset
- cumulativeScrollOffset
- descendantOf
- descendants
- down
- empty
- extend
- fire
- firstDescendant
- getDimensions
- getElementsByClassName
- getElementsBySelector
- getHeight
- getOffsetParent
- getStyle
- getWidth
- hasClassName
- hide
- identify
- immediateDescendants
- insert
- inspect
- makeClipping
- makePositioned
- match
- next
- nextSiblings
- observe
- positionedOffset
- previous
- previousSiblings
- readAttribute
- recursivelyCollect
- relativize
- remove
- removeClassName
- replace
- scrollTo
- select
- setOpacity
- setStyle
- show
- siblings
- stopObserving
- toggle
- toggleClassName
- undoClipping
- undoPositioned
- up
- update
- viewportOffset
- visible
- wrap
- writeAttribute
adjacent
1.6
Element.adjacent(element[, selectors...]) -> [HTMLElement...]
someElement.adjacent([selectors...]) -> [HTMLElement...]
Finds all siblings of the current element that match the given selector(s).
Examples
<ul id="cities">
<li class="us" id="nyc">New York</li>
<li class="uk" id="lon">London</li>
<li class="us" id="chi">Chicago</li>
<li class="jp" id="tok">Tokyo</li>
<li class="us" id="la">Los Angeles</li>
<li class="us" id="aus">Austin</li>
</ul>
$('nyc').adjacent('li.us');
//-> [<li#chi, li#la, li#aus>]