Jquery - Hide specific div
- by Jova
I have several divs that share a common class. If one of these divs do not have a child div, I want to hide the div. I can find the right div but I'm unable to hide it.
This is my code,
$(function() {
if ($(".adRight.childen('div')").length == 0) {
$(this).hide();
}
});
What should I use instead of (this)? this refers to the document and not the div the if-statement found.