[jQuery] Some questions about selector

[jQuery] Some questions about selector


I have the following source code:
************************************************************************************
<head>
    <title>Untitled</title>
    <script type="text/javascript" src="js/jquery-1.3.2.js"></script>
    <script type="text/javascript">
    <!--
        $(function () {
            var $d = $('p > div');
            $d.css('border', '1px solid gray');
        });
    //-->
    </script>
</head>
<body>


    <div>
        p - div
    </div>




</body>
************************************************************************************
I can't get the <div> inside

.
and I changed the source code, upset the <div> and

, and the
selector $('p > div') → $('div > p'):
************************************************************************************
<head>
    <title>Untitled</title>
    <script type="text/javascript" src="js/jquery-1.3.2.js"></script>
    <script type="text/javascript">
    <!--
        $(function () {
            var $d = $('div > p');
            $d.css('border', '1px solid gray');
        });
    //-->
    </script>
</head>
<body>
<div>
    


        div - p
    


</div>
</body>
************************************************************************************
and i can get

inside <div>.
Who can tell me why?