the following code is u...">

Jquery live keyup not working

I have a text box

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

the following code is used

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

This does not work. But if I use 'click' instead of 'keyup', this will work. What could be wrong?

+3
source share
2 answers

As stated in the comments, you are using jQuery version 1.3.1. Event support keyupfor has live()not been fully introduced. Update jQuery with either the latest version or at least 1.4.x and everything will be fine.

Source

+10
source

This is strange. Could you try:

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

Hope this helps. Greetings

+3
source

All Articles