Swap place of 2 elements

Topics: Developer Forum, Project Management Forum, User Forum
Feb 6, 2010 at 7:11 AM

I want to swap place of 2 elements in a html document . But there is no any methods for this.

Example

<div>

<div id="d1">thi is first node</div>

<div id="d2">thi is second node</div>

</div>

I need a method for change place of div#d1 width div#d2

<div>

<div id="d2">thi is second node</div>

<div id="d1">thi is first node</div>

</div>