Hola.js DocumentationBlogBlogSupport UsSupport UsAboutAboutContact ↗Contact ↗ (opens in a new tab)
GitHubGitHub (opens in a new tab)
  • Hola.js Intro
  • Install Hola.js
  • Hello World
  • Event Methods
    • Blur(callback)
    • Change
    • Focus
    • Hover
    • Keydown
    • Keyup
    • Mousemove
    • Off
    • On
    • One
    • Submit
    • Trigger
  • Filtering Methods
    • Eq
    • Filter
  • Insertion Methods
    • After
    • Append
    • Before
    • Prepend
  • Selection and Manipulation Methods
    • Addclass
    • Attr
    • CSS
    • Hide
    • HTML
    • Removeattr
    • Removeclass
    • Show
    • Text
    • The $ Object
    • Toggleclass
  • Traversal Methods
    • Children
    • Find
    • Parent
    • Siblings
  • Hola.js Intro
  • Install Hola.js
  • Hello World
  • Blog
  • Support Us
  • About
  • Contact ↗ (opens in a new tab)
  • Event Methods
    • Blur(callback)
    • Change
    • Focus
    • Hover
    • Keydown
    • Keyup
    • Mousemove
    • Off
    • On
    • One
    • Submit
    • Trigger
  • Filtering Methods
    • Eq
    • Filter
  • Insertion Methods
    • After
    • Append
    • Before
    • Prepend
  • Selection and Manipulation Methods
    • Addclass
    • Attr
    • CSS
    • Hide
    • HTML
    • Removeattr
    • Removeclass
    • Show
    • Text
    • The $ Object
    • Toggleclass
  • Traversal Methods
    • Children
    • Find
    • Parent
    • Siblings
Question? Give us feedback → (opens in a new tab)Edit this page
Traversal Methods
Siblings

children

The siblings method selects the sibling elements of each element in the collection and returns a new collection containing the sibling elements.

// Select the sibling elements of the elements
siblings: function() {
  var siblings = [];
  this.elements.forEach(function(element) {
    siblings = siblings.concat([].slice.call(element.parentNode.children).filter(function(child) {
      return child !== element;
    }));
  });
  return $(siblings);
}
Parent

Hola.js Doc