Assign id dynamically for more than one tag
<p>I'm using following code to assign id of input tag when they are cloned.Is it possible to use same find method to select more tags like tr textarea etc.</p>

<pre><code>      var i=1;
      $("#bt1").click(function() {
       $("#invoice_tab tr:nth-child(2)").clone().find("input").each(function() {
           $(this).attr({
            'id': function(_, id) { return id + i },
            'name': function(_, name) { return name + i },
            'value': ''               
           });
       }).end().appendTo("#invoice_tab");
       i++;
</code></pre>
