[jQuery] must show an element if exists

[jQuery] must show an element if exists


hi,
i am learning jQuery and confused about one thing.below is simple code
using jQuery.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(document).ready(function() {
if ( $('#myDiv').length )
$('#myDiv').show();
});
</script>
</head>
<body>
<div id="myDiv">Search Engines</div>
</body>
</html>
i am trying below lines.
if ( $('#myDiv').length )
$('#myDiv').show();
according to this code if element exists then element should be show
but i did not look any thing.
kindly post your thoughts.