$('myTextBox').val(); undefined : <p>Here is my html tag:</p>

<pre><code>&lt;input type="number" id="priority" value="50" min="1" max="100"&gt;
</code></pre>

<p>My javascript code:</p>

<pre><code>var $value = $('priority');
alert($value.val());
</code></pre>

<p>This alerts undefined and I can't figure out why.</p>

<p>When I get rid of .val() it alerts [object Object]</p>

<pre><code>alert($value);
</code></pre>
