Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Sorry to tell you, but everything seems fine with what you did. I tried the example you gave on IE and it seems to work.</p> <p>If you inspect it with Developer Tools you still see the old id? what version of IE?</p> <p>here is the code I tried:</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;script src="http://code.jquery.com/jquery-1.10.1.min.js"&gt;&lt;/script&gt; &lt;script&gt; $(function() { $("#new").click(function(e) { e.preventDefault(); var d = new Date(); var counter = d.getTime(); var master = $("table.myTable"); var prot = master.find("tr.prototype").clone(); prot.removeClass('prototype'); prot.addClass("contact"); //$(prot.find("input")[0]) prot.find("#myValue1").attr('id',"myValue1"+counter); prot.find("#myValue2").attr('id',"myValue2"+counter); prot.find("#myValue3").attr('id',"myValue3"+counter); prot.find("#myValue4").attr('id',"myValue4"+counter); prot.find("#myValue1"+counter).attr('name',"myValue1"+counter); prot.find("#myValue2"+counter).attr('name',"myValue2"+counter); prot.find("#myValue3"+counter).attr('name',"myValue3"+counter); prot.find("#myValue4"+counter).attr('name',"myValue4"+counter); jQuery('table.myTable tr:last').before(prot); counter++; }); }); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;table class="myTable"&gt; &lt;tr class="prototype"&gt; &lt;td&gt; &lt;label for="myValue1"&gt;MY Value ONE:&lt;/label&gt;&lt;br&gt; &lt;input class="required email" id="myValue1" type="text" value="" name="myValue1"&gt; &lt;/td&gt; &lt;td&gt; &lt;label for="myValue2"&gt;MY Value TWO:&lt;/label&gt;&lt;br&gt; &lt;input class="required email" id="myValue2" type="text" value="" name="myValue2"&gt; &lt;/td&gt; &lt;td&gt; &lt;label for="myValue3"&gt;MY Value THREE:&lt;/label&gt;&lt;br&gt; &lt;input class="required email" id="myValue3" type="text" value="" name="myValue3"&gt; &lt;/td&gt; &lt;td&gt; &lt;label for="myValue4"&gt;MY Value FOUR:&lt;/label&gt;&lt;br&gt; &lt;input class="required email" id="myValue4" type="text" value="" name="myValue4"&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;input type="button" id="new" /&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload