Hi all,
I've got an ordered list <OL> with 5 list items. Each list item contains
an input and the list is, as you would expect, numbered from 1 to 5.
There is a link to add another item to this list which I have bound the
following function to:
$("#materialadd").click(function() {
$("#materialol li:last").clone().appendTo("#materialol");
$("#materialol li:last").hide().fadeIn("fast");
return false;
});
#materialol is the list - the last item is cloned and appended to the
end of the list, then hidden and faded in so the user can spot the change.
In Firefox, this works perfectly, and the list numbering is continued.
Click it once, and the next item is 6, then 7, then 8.......
In IE...... not so much. IE 6 and 7 both execute the cloning and
addition process but the list items numbers of the cloned + added items
are 1. So you end up with a list numbered 1, 2, 3, 4, 5, 1, 1, 1, 1, 1.....
Is there another way for me to do what I'm doing that will work properly
in IE as well as FF?
I'm using jQ 1.2.6 by the way.
Regards,
Michael Price