UNPKG

jquery

Version:

JavaScript library for DOM operations

12 lines (9 loc) 183 B
export function siblings( n, elem ) { var matched = []; for ( ; n; n = n.nextSibling ) { if ( n.nodeType === 1 && n !== elem ) { matched.push( n ); } } return matched; }