<div id="mDiv" style="display:none">DIV1</div>
if($("#mDiv").is(":hidden")){
$(this).show();
}else{
$(this).hide();
}
<div id="mDiv" style="display:none">DIV1</div>
if($("#mDiv").is(":hidden")){
$(this).show();
}else{
$(this).hide();
}