Skip to content

Instantly share code, notes, and snippets.

@gonghao
Created March 9, 2011 18:07
Show Gist options
  • Save gonghao/862657 to your computer and use it in GitHub Desktop.
Save gonghao/862657 to your computer and use it in GitHub Desktop.
function getNextSibling(ele) {
while (ele = ele.nextSibling) {
if (1 === ele.nodeType) return ele;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment