if($("p").is(":visible")){ alert("The paragraph is visible."); } else{ alert("The paragraph is hidden."); }