implementing a wait for element present for N seconds before interacting with an element with javascript and jQuery lib
<p>I have the following code:</p>

<pre><code>var play = function() {
    $(steps).each(function(i, e) {
        $(this).is(':visible') 
            ? $(this).click()
            : console.log($(this).html() + ': not visible');
    });
};
</code></pre>

<p>The problem with this code is that it <strong>immediately</strong> clicks on the element if it is visible. However, I would like to wait/poll for the element to be present for up to <strong>N</strong> seconds before I click on the element. Any suggestions on how I could implement this? Thanks!</p>
