why  is there no value for variable in this jquery code?
<pre><code>  var ret = { valid: true, message: "" };
    var prtime = $(".ptime").val();
    var ctime = $(".ctime").val();

    if ($(prtime).length == 0 || $(ctime).length == 0) {
        ret = { valid: false, message: "" };
    }

$(prtime).length
</code></pre>

<p>when  I run this I get 0 even I when fill some words in prtime , and when I  do 
<code>$(".ptime").val()</code>.length then it shows me the length.</p>

<p>what are have I done wrong with that code</p>
