Widget:KeywordSearch: Difference between revisions

Jump to navigation Jump to search
Matt Pijoan (talk | contribs)
No edit summary
Matt Pijoan (talk | contribs)
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 37: Line 37:
});
});
function clearEmptyDivs(){
function clearEmptyDivs(){
$.each($(":br"), function(){
console.log($(this).parent());
}
$.each($(".query"), function(){
$.each($(".query"), function(){
if($(this).children().length === 0){
if($(this).children().length === 0){
alert('Empty');
$(this).remove();
}else{
console.log($(this).children());
}
}
});
});
Line 54: Line 55:
$(this).remove();
$(this).remove();
}
}
clearEmptyDivs();
});
});
});
});
Line 68: Line 70:
$(this).remove();
$(this).remove();
}
}
clearEmptyDivs();
});
});
});
});

Latest revision as of 15:59, 23 October 2013