jQuery: Move element position
<p>In each div, there are two buttons: higher and lower. When 'higher' is clicked, if this div is not at the top position, then it is moved higher than original. When 'lower' is clicked, then the element will be moved lower than original. </p>

<p>The question is: How to the elements can be moved up and down of with respect to another element?</p>

<pre><code>&lt;div&gt;
    &lt;div id="a1"&gt;a1&lt;input name='higher' type='button' value='higher'/&gt;&lt;input name='lower' type='button' value='lower'/&gt;&lt;/div&gt;
    &lt;div id="a2"&gt;a2&lt;input name='higher' type='button' value='higher'/&gt;&lt;input name='lower' type='button' value='lower'/&gt;&lt;/div&gt;
    &lt;div id="a3"&gt;a3&lt;input name='higher' type='button' value='higher'/&gt;&lt;input name='lower' type='button' value='lower'/&gt;&lt;/div&gt;
&lt;/div&gt;
</code></pre>
