Hallo MudGuard.
parent.removeChild(item1);
parent.insertBefore(item1, item2);Denk mal drüber nach, was Du da machst.
Du entfernst das item1 aus dem parent.
Anschließend versuchst Du, vor dem (nicht mehr in parent enthaltenen, da gerade eben entfernten) item1 was einzufügen.
Sicher? Ich meine dort zu erkennen, dass item1 entfernt und im Folgenden vor item2 item1 eingefügt wird.
Einen schönen Mittwoch noch.
Gruß, Ashura
--
sh:( fo:} ch:? rl:( br: n4:~ ie:{ mo:| va:) de:> zu:} fl:( ss:) ls:[ js:|
„It is required that HTML be a common language between all platforms. This implies no device-specific markup, or anything which requires control over fonts or colors, for example. This is in keeping with the SGML ideal.“
[HTML Design Constraints: Logical Markup]
sh:( fo:} ch:? rl:( br: n4:~ ie:{ mo:| va:) de:> zu:} fl:( ss:) ls:[ js:|
„It is required that HTML be a common language between all platforms. This implies no device-specific markup, or anything which requires control over fonts or colors, for example. This is in keeping with the SGML ideal.“
[HTML Design Constraints: Logical Markup]