Concatenation error in jquery
Hi following is a working codevar j=1;
$('.btn').click(function (e) {
e.preventDefault();
dyntable = "";
j += 1;
count += 8;
dyntable += '<tr id=' + j + '>';
for (i = i; i <= count; i++) {
dyntable += '<td><input width="70px;" class="cp" type="text" id="textbox' + i + '" /></td>';
}
dyntable += '<td><input type="button" value="Add" class="btn"/></td>';
dyntable += '</tr>';
$(dyntable).insertAfter('#1');
$('.cp').width(70);
});
My requirement is to concatenate following statement with j
$(dyntable).insertAfter('#1');
like $(dyntable).insertAfter('#'+j);
i have tried several times like $(dyntable).insertAfter("#'+j+'");
but not working
how to solve this
Regards
Baiju