Reputation: 1654
If div#FeatureIconsWrapper
contains NO li
Then div#productInfoGrid
is hidden by either by css or removed completly.
I have tried(is this correct?):
$("div#FeatureIconsWrapper:not(li)")({
$("div#productInfoGrid").hide();
});
Upvotes: 0
Views: 1091
Reputation: 34107
Please try this:
API: http://api.jquery.com/has/
$(document).ready(function() {
if ($("div#FeatureIconsWrappet:not(:has(li))")) { //.hide()
$("div#productInfoGrid").hide();
}
});
Upvotes: 2
Reputation: 145408
You can use :has
:
if (!$("#FeatureIconsWrapper:has(li)").length) {
$("#productInfoGrid").hide(); // or remove()
}
DEMO: http://jsfiddle.net/8T4ka/2/
Upvotes: 4