Search code examples
jquerylive

Jquery live keyup not working


I have text box

<input type="text"  name="extraQty0"  class="extraEvent" value="1"/>

used following code

$(".extraEvent").live('keyup',function(){
   alert('test');
});  

This is not working But if i use 'click' instead of 'keyup' the alert will work. What could be wrong?


Solution

  • As mentioned in the comments, you are using jQuery version 1.3.1. Support for the keyup event for live() wasn't introduced until later. Update your jQuery to either the latest version or at least 1.4.x and you should be fine.

    Source