Please check my [jsfiddle](https://jsfiddle.net/awct4eu8/) to check the whole code. I am trying to hide the whole contentMachine div if the div class timeimg is empty or no ledBar with status-1 or status-2 classes are present. 

I have the ff code right now:

```
$(function() {
    function showHideEmptyBlocks() {
        $(".contentMachine").each(function() {
            // var isVisible=$(this).find(".timeimg").text() && $(this).find(".timeimg").text().length;
            var display=$(this).find(".ledBar").is('.status-1, .status-2');
            //console.log('display >' , display);
            if(display) {
                $(this).show();
            } else {
                $(this).hide();
            }
        })

        setTimeout(function(){
            showHideEmptyBlocks();
        },1);
    }
    showHideEmptyBlocks();
})

```

It is now hiding if there is no status-2 or status-1 class inside the ledbar class... I just wanna add a logic that hides it as well when span class timeimg is EMPTY