[jQuery] Still trying to understand index function

[jQuery] Still trying to understand index function


My understanding of the index function was that it takes an OBJECT to
match in a list of same type objects so as a trivial example
$(document).ready(function(){
        var firstPara = $("p#first").get();
        alert($("p").index(firstPara));
    });
with the following :
<body>
<p id="first">First para
<p id="second">Second para
</body>
seemingly should work...
It does not. Just looking for some advice so I can move on to finding
indexes of classed <th> and do some interesting things I have in mind.
Thanks for any help in advance.