jquery-genealogy
jquery-genealogy copied to clipboard
Add $.fn.closestChildren to keep things DRY
Since this pattern is used in both prevCousins
and prevNieces
, it might be worthwhile to give it its own method. Something like:
$.fn.closestChildren = function() {
return this.map( function () {
return $( this ).children().get().reverse();
} );
};