Skip to content

Instantly share code, notes, and snippets.

@ludder
Created January 24, 2013 15:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ludder/4623036 to your computer and use it in GitHub Desktop.
Save ludder/4623036 to your computer and use it in GitHub Desktop.
/*
Returns true if element has next sibling (of type element)
*/
function hasNextSibling(node) {
var bln = false;
while( (node = node.nextSibling) !== null ) {
if (node.nodeType !== 1) {
continue;
}
bln = true;
}
return bln;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment