I am having some issues with Microsoft Explorer 6/7 and the jQuery "clone" function. The jQuery that I am using is:
$(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;
});
});
The html form looks like this:
<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>
The Microsoft browser is unable to replicate more than one clone, and does not style (css) the new elements.
Please advise me to a IE friendly alternative! Thanks.