Could you tell me why jquery settimeout doesnt work with ajax keyup event
<p>My question about setTimeout in my html code i use ajax with jquery again and my code  .And i use primefaces jsf . Why am i using jquery settimeout with ajax keyup event </p>

<p>This is my jquery code and its now working but when i add settimeout its not working.</p>

<pre><code>$ = jQuery;

$(document).ready(function()  
{
    setTimeout(function()
    {
        refreshHook();
    },1000)

});


function refreshHook()
{
    $(".numberonly").keydown(function(event) 
    {  
        // Allow: backspace, delete, tab and escape
        if ( event.keyCode == 46 || event.keyCode == 8 || event.keyCode==190 || event.keyCode == 9 || event.keyCode == 27 || 

        // Allow: Ctrl+A
        (event.keyCode == 65 &amp;&amp; event.ctrlKey === true) || 

        // Allow: home, end, left, right
        (event.keyCode &gt;= 35 &amp;&amp; event.keyCode &lt;= 39)) {

        // let it happen, don't do anything
        return;
    }
    else 
    {
        // Ensure that it is a number and stop the keypress
        if (  event.shiftKey|| (event.keyCode &lt; 48 || event.keyCode &gt; 57) &amp;&amp; (event.keyCode &lt; 96 || event.keyCode &gt; 105 ) ) 
        {
            event.preventDefault(); 
        } 
    }

   });
  }
</code></pre>

<p>This is my html code.</p>

<pre><code>&lt;p:fieldset legend="Fieldset" style="background-color: lightsteelblue" &gt;
    &lt;h:panelGrid columns="5"&gt;
    &lt;strong&gt;LandAmoutn(Ha):&lt;/strong&gt;
    &lt;p:inputText id="spinner1" type="text" styleClass="numberonly"  value="#{carbonController.model.meyvebahcesidikimi}"  style="background-color: lightgrey" &gt;
    &lt;p:ajax event="keyup" process="@this" update="birdikim"  listener="#{carbonController.doMeyveBahcesiDikimHesabı}"/&gt;

    &lt;/p:inputText&gt;
    &lt;p:row&gt;&lt;strong&gt;=&lt;/strong&gt;&lt;/p:row&gt;
    &lt;p:inputText id="birdikim" value="#{carbonController.model.meyvebahcesidikimsonuc}" readonly="true" style="background-color:lightgrey"&gt;
    &lt;f:convertNumber integerOnly="true"/&gt;
    &lt;/p:inputText&gt;
    &lt;p:row&gt;&lt;strong&gt;Mg C/Ha&lt;/strong&gt;&lt;/p:row&gt;
    &lt;/h:panelGrid&gt;
&lt;/p:fieldset&gt;
</code></pre>

<p>Can anybody tell me where is my mistake. i spent a lot of times.I want to send my images but stackoverflow doenst allow to send :)</p>
