jQuery: conditionally executing without "if"
<p>Is there a way in jQuery or javascript to ignore all operations if the wrapped sets size is 0 withoug using if statement.</p>

<pre><code> menu.find('a[href="#add"]'). {code that should execute only if size()&gt;0};
</code></pre>

<p>I guees I would normally have to do something like this</p>

<pre><code>var m = menu.find('a[href="#add"]');

if m.size()&gt;0 { do something }
</code></pre>

<p>Is there a shorter way of doing this?</p>

<p>Edit: full code</p>

<pre><code>menu.find('a[href="#add"]').attr("href","#add-metaobject")[0].innerText = "Add Object";
</code></pre>
