to convert a plain js function to jQuery
<p>i have a js function and this is working when the page loads but i tried to convert into jQuery &amp; not working now. please help me out and describe why isn't this working.</p>

<pre><code>window.onload = function updatePreviewHTML() {

              alert("hello");   }
</code></pre>

<p>as i converted this into jQuery but it's not working</p>

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

            alert("Hello");         });
</code></pre>

<p>Thanks for your time.</p>
