why does the .bind() not work outside the .ready() function?
<p>On click of a button I am showing an alert message. Below is the code that I am using.</p>

<pre><code>&lt;script type="text/javascript"&gt;
// $(document).ready(function(){
    $("#clickHere").bind("click",function(){
        alert('clicked');
     });
 //});
 &lt;/script&gt;
</code></pre>

<p>As the .ready() line is commented, when I click on the button the alert message is not thrown, but if I uncomment those lines the the alert is thrown. Shouldn't the alert message be shown in both the cases as I have added binding to the button on 'click' event?</p>
