Problem with cloned field

hi

i have this http://jsfiddle.net/xP9Bx/ that wotks well

now i am trying to change <input id="input1" /> to <div id="input1"> </div> http://jsfiddle.net/J7sMr/.

The problem is the id, it is supposed change, like input1, input2, but in the second example the new divs always have the same id.

In the first example the name of the id’s are input1, input2, input3,…

solved

        $('#btnAdd').click(function() {
            $('.btnDel:disabled').removeAttr('disabled');
            var c = $('.clonedInput:first').clone(true);
                c.children('div').attr('id','input'+ (++inputs) ).val('');
                c.children(':button').attr('name','btnDelete'+ (inputs) );
            $('.clonedInput:last').after(c);
        });