Assign different value if element exists
<p>I'm trying to assign one of two values to a variable, depending on whether an element is present or not. I thought something like this should work...</p>

<pre><code>$optsH = function(){
    if ( jQ('#options').length &gt; 0 ) {
        return jQ('#options').outerHeight();
    } else {
        return 0;
    }
}
</code></pre>

<p>... but no.</p>

<p>I know this should be simple, but it's been a long day.</p>
