Can use auto complete function on same classname with clone row?
Hi did anyone know is there possible to use autocomplete function with same class name with clone row,thanks
Here is the jquery code:
$(".products").autocomplete({
source: '../php/productresult.php',minLength: 1
});
$('#qty').keypress(function(e) {
if (e.keyCode == 13)
{
//$('#invoice_table>tbody>tr:last').clone(true).insertAfter('#invoice_table tr:last');
$('#invoice_table>tbody>tr:last').clone(true).insertAfter('#invoice_table tr:last');
$('#invoice_table>tbody>tr:last #product').val("");
$('#invoice_table>tbody>tr:last #itemno').val("");
$('#invoice_table>tbody>tr:last #porder').val("");
$('#invoice_table>tbody>tr:last #qty').val("");
}
});
Here is the html code:
<form method="post" action="" id="product_form">
<tr class="mytr">
<td id="orders"><input type="text" name="product[]" id="product" class="products" size="70"><button id="add" class="add" type="button">+</button></td>
<td align="right"><p><input type="text" name="itemno[]" id="itemno" size="5">
</p></td>
<td align="right"><p><input type="text" name="porder[]" id="porder" size="5">
</p></td>
<td align="right"><p><input type="text" name="qty[]" id="qty" size="5">
</p></td>
</tr>
</form>