Browse the passed element next siblings to find the first element that matches the passed selector

Name Type Description Status Default
elm { HTMLElement } The element to start on required
selector { String } A css selector to search for required

Return { HTMLElement } The element found or null


    import next from 'sugarcss/js/dom/next'
const nextElm = next(myCoolElement, '.my-cool-class');
if (nextElm) {
        // we have found en element that matches the selector

Author : Olivier Bossel