jQuery onExists?
<p>Does something like this already exist in jQuery?</p>

<pre><code>function onExists(o, f) {
  if (o.length) {
    f(o); 
  }
}

onExists($(":button"), function(o) { o.button(); });
</code></pre>
