Document ready button.click only works in console
<p>I have a button<code>&lt;button id="stbutton"&gt;&lt;/button&gt;</code> and I can enter into the Chrome Dev Console <code>$('#stbutton').click();</code> and it works. Sounds easy enough, however:</p>

<pre><code>$(document).ready(function () {
    $("#stbutton").click();
});
</code></pre>

<p>Doesn't work. Also tried waiting for the parent div to load, no dice,</p>

<pre><code> $('#panel').ready(function () {
    $("#stbutton").click();
});
</code></pre>

<p>As for this page, I know it works in console. And jquery is definitely being loaded before it hits this line of code. </p>