Skip to content

Instantly share code, notes, and snippets.

@JKirchartz
Created April 4, 2011 14:21
Show Gist options
  • Save JKirchartz/901715 to your computer and use it in GitHub Desktop.
Save JKirchartz/901715 to your computer and use it in GitHub Desktop.
Extend xuiJS with jQuery style next & is functions
x$.extend({
'next': function() {
var n = this[0];
do{n = n.nextSibling;}
while (n && n.nodeType != 1);
return x$(n);
},
'is': function(sr) {
sr = sr.toUpperCase();
var n = this[0];
if(sr == n.nodeName){
return x$(n);
}
return false;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment