<
input
type
=
"button"
name
=
"name"
value
=
"MakeClone "
id
=
"btnRow"
/>
<
table
>
<
tbody
>
<
tr
id
=
"AssRow"
>
<
td
>
<
input
id
=
"titles"
/>
</
td
>
</
tr
>
</
tbody
>
</
table
>
on click of button to Clone the row and add the unique id to it.
<script type="text/javascript">
$(functionn(){
$('#btnRow').on("click", function () {
$("#AssRow").clone(true).find("input").each(function () {
$(this).val('').attr('id', function (_, id) { return id + i });
}).end().appendTo("table");
i++;
});
});
</script>
as of now its not working correctly. whenever i click on the cloned combo box it will open the orginal combo - box. can you give me a sample to do clone with jquery with unique id. and getting value from it.