jQuery "Genealogy" plugin
github.com
github.com
jQuery.fn.extend({
grandchildren: function() {return this.children().children();},
greatGrandchildren: function() {return this.grandchildren().children();},
grandparent: function() {return this.parent().parent();},
greatGrandparent: function() {return this.grandparent().parent();},
aunts: function() {return this.parent().siblings();},
prevAunt: function() {return this.parent().prev();},
prevAunts: function() {return this.parent().prevAll();},
nextAunt: function() {return this.parent().next();},
nextAunts: function() {return this.parent().nextAll();},
cousins: function() {return this.aunts().children();},
prevCousins: function() {return this.prevAunts().map(
function () {return jQuery( this ).children().get().reverse();});},
nextCousins: function() {return this.nextAunts().children();},
nieces: function() {return this.siblings().children();},
prevNieces: function() {return this.prevAll().map( function () {
return jQuery( this ).children().get().reverse();} );},
nextNieces: function() {return this.nextAll().children();}
});
jQuery.fn.uncles = jQuery.fn.aunts;
jQuery.fn.prevUncle = jQuery.fn.prevAunt;
jQuery.fn.prevUncles = jQuery.fn.prevAunts;
jQuery.fn.nextUncle = jQuery.fn.nextAunt;
jQuery.fn.nextUncles = jQuery.fn.nextAunts;
jQuery.fn.nephews = jQuery.fn.nieces;
jQuery.fn.prevNephews = jQuery.fn.prevNieces;
jQuery.fn.nextNephews = jQuery.fn.nextNieces;Also, peruse means to pore over meticulously, not glance over.
A cursory examination is not a thorough one.
I don't think it's ready for production anyway until it has el.creepyUncle() and el.nieceWithInappropriateFacebookPhotos()
(Maybe if I saw the code, I could actually keep straight how those more distant relations work...)