Get the values according to the rearranged unordered list in a textbox
<p>I want to arrange values in a text field according to the order of the list items in an unordered list.
List is as following:-</p>

<pre><code>&lt;ul id="sort"&gt;
    &lt;li&gt;1&lt;/li&gt;
    &lt;li&gt;2&lt;/li&gt;
    &lt;li&gt;3&lt;/li&gt;
    &lt;li&gt;4&lt;/li&gt;
    &lt;li&gt;5&lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>I am using <code>sortable()</code> function of Jquery UI on the list mentioned above.
I need to copy the same arrangement in a textbox value:-</p>

<pre><code>&lt;input type="text" value="" /&gt;
</code></pre>

<p>For example - If the list is rearranged as <code>3,2,5,4,1</code>, textbox value should be <code>3,2,5,4,1</code> :-</p>

<pre><code>&lt;input type="text" value="3,2,5,4,1" /&gt;
</code></pre>

<p>Thanks in advance!</p>
