JQuery - Finding from a list of ULs, the UL with the least List items
<p>Hi here's what I'm trying to accomplish. I have a div with  ID="columns", in this example I have 3 columns, but there may be more or less... I'm using JQuery to add list items dynamically.</p>

<pre><code>&lt;div id="columns"&gt;
   &lt;ul id="column1" class="column"&gt;
   &lt;/ul&gt;
   &lt;ul id="column2" class="column"&gt;
   &lt;/ul&gt;
   &lt;ul id="column3" class="column"&gt;
   &lt;/ul&gt;
&lt;/div&gt;
</code></pre>

<p>I'm using the following to get a list of UL's </p>

<pre><code>var columns = $("#columns ul");
</code></pre>

<p>Now, what I'd like to do is when adding a dynamic LI I'd like to loop through these columns and add it to the column with the least amount of list items...</p>

<p>I'm getting the count of items for specific columns using the following</p>

<pre><code>var countColumn1 = $("#column1").children().length;
</code></pre>

<p>So I'm nearly there, just need a little assistance traversing through the dynamic var columns and then returning the UL with the shortest length.</p>

<p>Hope this makes sense.</p>

<p>Tanks!</p>

<p>Ian</p>
