Jquery: Is there some way to make val() return an empty string instead of 'undefined' for an empty list?
<p>With Jquery, is there some way to make val() return an empty string instead of 'undefined' when called against an empty list of elements?</p>

<p>E.g., I have this code:</p>

<pre><code>var x = $('#my-textbox-id').not('.watermark').val();
</code></pre>

<p>The idea is that I want to get the value of my textbox, but I want an empty string if it is currently showing the watermark (i don't want the watermark value!).</p>

<p>The selector works, but i don't want 'undefined' - I want an empty string ''.</p>
