What would be a good strategy for dealing with duplicated id's when using jquery clone method? For example, i need to clone a button in a unspecified number of times. Which is the best way for generating unique id's and keep track of it?
<div id="button-pool">
<button id="bt1" class="return">Button</button>
</div>
$(document).ready(function(){
$("#bt1").click(function(){
var newButton = $(this).clone();
$("#button-pool").append(newButton);
});
});