<div class="actions"> <h3>Actions</h3> <ul> <li><a href="/configurations">Configurations</a></li> </ul> </div> <script type="text/javascript" src="/jquery.min.js"></script> <script type="text/javascript"> $('ul a').click(function(){ alert(""); }); </script> In the above code is document.ready necessary. What i mean is, is there any case when js will be executed before html