[jQuery] hiding a div when another div becomes empty?
Hi all,
I am removing links from a div when they are clicked on using the code
below:
$('#hiddenleft a').livequery('click', function() {
var $this = $(this).attr("class");
$('#'+$this).show();
$(this).remove();
});
when all links are removed, i want hide that div & the div above it -
hiddencontent .
the links are displayed in the following divs:
<div id="hiddencontent">hidden items</div>
<div id="hiddenitems"><div id="hiddenleft"> ...links...</div></div>
any ideas on how i would do it?