.live blur is not working
Hi,
My .blur event is not working when I use in append() div. Also I use live but still this is not working.
When I recall my function in add function then its call for all next row.
Below is my code:
function tableOrder(){
$("#orderTable tr").each(function(){
$(this).find("input:first").live("blur", function(){
alert($(this).val());
});
//return false;
});
}
function addProduct(){
var totalRows = 5;
var productID = 1;
$("#addProduct").click(function(){
var currentRows = $("#orderTable tr").length-1;
var newRow = "<tr><td class='tableLeft'><input type='text' class='textfield4'></td><td><select class='select2'><option>PDF</option><option>ePub</option><option>Mobi</option><option>Zip</option></select></td><td id='productID00" + productID + "'></td><td><input type='text' class='textfield5'></td><td align='right' class='tableRight'><img src='images/delete.gif' alt='Remove' title='Remove' class='removeProduct'></td></tr>";
$("#orderTable").append(newRow);
productID++;
tableOrder(); //Recalling function
});
}
Please have a look.
Thanks