$.fn.dirFind = function(selector, dir) {
var elems = [], item;
console.log(selector, dir);
this.each(function() {
console.log(selector, this[dir]);
// return;
item = this;
while (item = this[dir]) {
console.log(dir, item, this[dir]);
if (item.nodeType == 1) {
return;
if ($(item).is(selector)) {
elems.push(item);
break;