Ich habe einige Probleme mit Microsoft Explorer 6/7 und die jQuery "Klon" -Funktion. Die jQuery, die ich benutze ist:jQuery .Clone() und Microsoft Explorer (Bug?)
$(function() {
$('#addFields').click(function() {
var newCredit = $('#original').clone(); // create new set
newCredit.find('input').val(''); // empty input fields
$(this).before(newCredit); // append at the end
return false;
});
});
Die HTML-Formular sieht wie folgt aus:
<div id="original">
<li id="prodEnt" >
<label class="description" for="entity[]">Entity </label>
<div>
<input name="entity[]" class="element text medium" type="text" value="" />
</div>
</li>
<li id="entFunc" >
<label class="description" for="element_5">Function </label>
<div>
<input name="function[]" class="element text medium" type="text" value="" />
</div>
</li>
<li class="section_break_small"></li>
</div>
Der Microsoft-Browser ist nicht in der Lage mehr als einen Klon zu replizieren, und nicht Stil (CSS), um die neuen Elemente.
Bitte beraten Sie mich zu einem IE freundliche Alternative! Vielen Dank.
ich meine Antwort aktualisiert um zu zeigen, wie man nur das erste auswählt, wenn man es in eine Klasse geändert hat. Ich hoffe es hilft. :) –