if statement not working when checking for display:none
<pre><code>$("table").everyTime(5000, function(){  

if(($("#morning").css("display")) != "none"){
    $("#morning").hide();
    $("#afternoon").show();
}else{
$("#morning").show();
    $("#afternoon").hide();
}

$.ajax({
    type: "GET",
    url: "sample.xml",
    dataType: "xml",
    success: parseXml
});

}, 0);

});
</code></pre>

<p>my table morning starts as being visible, so when my if statement runs every 5 seconds it should hide it then make the next table visible. When morning is not visible i want it to be set as visible.</p>

<p>For some reason, what looks to be a simple if statement, is not working. If I get rid of the else it will hide morning and show afternoon. But, when the else is added, nothing really happens.</p>
