@coreui/vue-pro
Version:
UI Components Library for Vue.js
19 lines (17 loc) • 590 B
JavaScript
const getNextSibling = (elem, selector) => {
// Get the next sibling element
let sibling = elem.nextElementSibling;
// If there's no selector, return the first sibling
if (!selector)
return sibling;
// If the sibling matches our selector, use it
// If not, jump to the next sibling and continue the loop
while (sibling) {
if (sibling.matches(selector))
return sibling;
sibling = sibling.nextElementSibling;
}
return;
};
export { getNextSibling as default, getNextSibling };
//# sourceMappingURL=getNextSibling.js.map