To delay javascript function call using jquery
<p><strong>CODES:</strong></p>

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

    function sample()
    {
       alert("This is sample function");
    }

   $("#button").click(function(){
    t=setTimeout("sample()",2000);
    });

    });
</code></pre>

<p><strong>HTML:</strong></p>

<pre><code>&lt;input type="button" name="button" id="button" value="Call sample function with delay"&gt;
</code></pre>

<p>Once i click button sample function is not called with a delay of 2 seconds. I dont know whats wrong. Please notify me how to do this</p>

<p><strong>Question:</strong> To call javascript function using setTimeout via jquery</p>
