jQuery use keypress on absolute input
<p>i'm using jquery to insert input tag on element absolute and i i want to use keypress on that.</p>

<p>after create and use keypress in <code>on()</code> i cant get keypress (enter).</p>

<p>jQuery inserted input element:</p>

<pre><code>$(event.target).html("&lt;input value= '"+ $(event.target).text() +"' style='width:200px;float:right;height:17px;padding:0px;height:22px;padding-right:3px;' id='category_input_change' /&gt;");
$(event.target).append("&lt;ul class='styledlist' style='width:50px;float:right;'&gt;&lt;li style='line-height:13px;' id='save_category' &gt;ذخیره&lt;/li&gt;&lt;/ul&gt;");
$(event.target).append("&lt;ul class='styledlist' style='width:50px;float:right;'&gt;&lt;li style='line-height:13px;' id='cancel_save_category' &gt;انصراف&lt;/li&gt;&lt;/ul&gt;") ;
</code></pre>

<p>keypress functions:</p>

<pre><code>$('category_input_change').bind('keypress', function(e) {
    if(e.keyCode==13){
        alert('ddddd');
        // Enter pressed... do anything here...
    }
});
</code></pre>

<p>i'm try to use on() but getting this error:</p>

<pre><code>TypeError: $(...).on is not a function
</code></pre>

<p>code:</p>

<pre><code>$('category_input_change').on('keypress', function(e) {
    if(e.keyCode==13){
        alert('ddddd');
        // Enter pressed... do anything here...
    }
});
</code></pre>
