I've write a addrow event like this....
$('.addRow').click(function(){
var $newTr = $('#tb1 tbody>tr:last').clone(true);
$newTr.insertAfter('#tb1 tbody>tr:last');
newRowNum += 1;
$newTr.find('input[id^=foods]').attr('id', function(){
var newID = 'foods' + newRowNum ;
$(this).attr('id',newID).attr('name',newID).attr('class',newID);
});
$('input[id=foods'+ newRowNum +']').jsonSuggest(
function(text, wildCard, caseSensitive, notCharacter) { ...