I\'m trying to remove a specific div if a separate div is empty. Here\'s what I\'m using:
$(document).ready(function () { if (\'#leftmenu:empty\') {
It depends what you mean by empty.
To check if there is no text (this allows child elements that are empty themselves):
if ($('#leftmenu').text() == '')
To check if there are no child elements or text:
if ($('#leftmenu').contents().length == 0)
Or,
if ($('#leftmenu').html() == '')