how to change order of html elements

vForums

New Member
for example I have a list of li's like this:\[code\]<li id='r1' class='myclass'>something</li><li id='r2' class='myclass'>something</li><li id='r3' class='myclass'>something</li><li id='r4' class='myclass'>something</li><li id='r5' class='myclass'>something</li>\[/code\]I want to use a function for replace two li with each other.for example: put li2 o first and put li1 on second.and I have a function like this:\[code\]function updown(li_id , dir){ //what should i type here....}\[/code\]li_id: is my li iddir: is "up" or "down"
 
Back
Top