this || that || whatever style syntax in jQuery
<p>I've got jQuery code that looks like this:</p>

<pre><code>var $selected = $('#mySelector');

if (!$selected.length) {
  $selected = $('#anotherSelector');

  if (!$selected.length) {
    // etc.
  }
}
</code></pre>

<p>Pretty ugly. I'd like to do something like this:</p>

<pre><code>var $selected = $('#mySelector') || $('#anotherSelector') || etc.
</code></pre>

<p>But since jQuery returns a jQuery object even when a selector doesn't match, this syntax doesn't work. Is there an equivalent with jQuery objects (or maybe a selector)? Thanks!</p>
