Hello

I am having a problem with onkeyup event inside jquery.

Below I have a function called getValues() which calculates two text fields dynamically giving third text box the sum. Function works ok on the first row of the table.

Code:
<script language="javascript">
function getValues(){
  var initialLikelihood=document.getElementById("initialLikelihood").value;
  var initialSeverity=document.getElementById("initialSeverity").value;
  document.getElementById("initialRisk").value = initialLikelihood * initialSeverity;
			
}
</script>
I also have another function which dynamically add rows onto existing table, however when I try to apply onkeyup event it will not perform the getValue() (highlighted in bold below). I would appreciate if someone could elaborate further to why onkeyup event will not trigger inside jquery.

Code:
<script type="text/javascript">
			
$(document).ready(function(){
						
$('.del').live('click',function(){
  $(this).parent().parent().remove();
});			
			
$('.add').live('click',function(){
  $(this).val('Delete');
  $(this).attr('class','del');
					
var appendTxt = "<tr> \
  <td><textarea style='width:180px; height:80px;' name='activity[]'></textarea></td> \
  <td><textarea style='width:180px; height:80px;' name='potentialHazard[]'></textarea></td> \
  <td><textarea style='width:180px; height:80px;' name='personnelAffected[]'></textarea></td> \
  <td><input type='text' name='initialLikelihood[]' id='initialLikelihood' onkeyup='getValues()'/></td> \
  <td><input type='text' name='initialSeverity[]' id='initialSeverity' onkeyup='getValues()'/></td> \
  <td><input type='text' name='initialRisk[]' id='initialRisk'/></td> \
  <td><textarea style='width:180px; height:80px;' name='controlMeasure[]'></textarea></td> \
  <td><input type='button' class='add' value='Add' /></td>";
   $("tr:last").after(appendTxt);		
});        
});
</script>