jQuery: running setInterval only when a given ID is present
<p>In jQuery, I would like to execute this code:</p>

<pre><code>setInterval((function() {
  return alert('hello');
}), 3000);
</code></pre>

<p>but only if the DOM contains a certain element, such as</p>

<pre><code>&lt;div id="say_hello"&gt;Say hello&lt;/div&gt;
</code></pre>

<p>This must be really basic, but I cannot seem to get it right.</p>
