From jquery back to JavaScript
<p>I need a pure JavaScript equivalent of this Jquery code:
because the use of libraries isnt allowed in my current project,</p>

<p>File handler.js</p>

<pre><code>$(document).ready(function(){

 $("#some_button").click(function(){

  alert('ok. works');

 });

});
</code></pre>

<p>File index.html</p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;script type="text/javascript" src="handler.js"&gt;&lt;/script&gt;
&lt;head&gt;
&lt;body&gt;
&lt;button id="some_button"&gt;Btn&lt;/button&gt;
&lt;/body&gt;

&lt;/html&gt;
</code></pre>
