diff --git a/src/dom/dom.js b/src/dom/dom.js index 9870c52..3b0f8d8 100644 --- a/src/dom/dom.js +++ b/src/dom/dom.js @@ -646,7 +646,30 @@ Element.Methods = { * - selector (String): A CSS selector. * * Finds all siblings of the current element that match the given - * selector(s). + * selector(s). If you provide multiple selectors, siblings matching *any* + * of the selectors are included. If a sibling matches multiple selectors, + * it is only included once. The order of the returned array is not defined. + * + * ##### Example + * + * Assuming this list: + * + * language: html + * + * + * Then: + * + * $('nyc').adjacent('li.us'); + * // -> [li#chi, li#la, li#aus] + * $('nyc').adjacent('li.uk', 'li.jp'); + * // -> [li#lon, li#tok] **/ adjacent: function(element) { var args = Array.prototype.slice.call(arguments, 1);