Changing various id's after cloning in jquery
<p>I'm trying to clone a table row and update the multiple id's to reflect the input fields. I start by doing this and it works:</p>

<pre><code>$(id).clone().attr("id", "newId");
</code></pre>

<p>That changes the id of my main table row to the new id. In the table row I have other id's that need to be changed. For example:</p>

<pre><code>&lt;input type="text" id="input_1"&gt;
</code></pre>

<p>Will be changed to:</p>

<pre><code>&lt;input type="text" id="input_2"&gt;
</code></pre>

<p>I thought it would be something like this to change the id's:</p>

<pre><code>$(id).clone().attr("id", "newId").("#input_1").attr("id", "input_2");
</code></pre>

<p>This doesn't work. How can I fix this so that all of the id's change? </p>
