tech1984
asked on
Move a childnode to the bottom of a unordered list with javascript
I have a group of <li> within <ul> I need to move an li to the bottom so I start with
<ul id="ul_group:>
<li>some test in position 1</li>
<li>some test in position 2</li>
<li>some test in position 3</li>
<li>some test in position 4</li>
</ul>
I want to do this
<ul id="ul_group:>
<li>some test in position 2</li>
<li>some test in position 3</li>
<li>some test in position 4</li>
<li>some test in position 1</li>
</ul>
<ul id="ul_group:>
<li>some test in position 1</li>
<li>some test in position 2</li>
<li>some test in position 3</li>
<li>some test in position 4</li>
</ul>
I want to do this
<ul id="ul_group:>
<li>some test in position 2</li>
<li>some test in position 3</li>
<li>some test in position 4</li>
<li>some test in position 1</li>
</ul>
ASKER
That is almost exactly what I needed, though for some reason I have to click twice to get it to change
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Did that work for you?
ASKER
Awesome thanks!
Super. I'm glad to have been able to help.
Thanks for the grade & points.
Good luck & have a great day.
Thanks for the grade & points.
Good luck & have a great day.
Open in new window