title: jQuery Find number of items per row in floated li's
body: <p>Is there a way to find number of items (<code>li</code> tag) inside a <code>ul</code> which has it's <strong>float:</strong> set to <strong>left</strong>. Assume i got loads of folders which are visually represented by <code>li</code> tags. Due to floating behavior as soon as the <code>li</code> does not fit in single row they will be pushed down giving it Rows and columns look.my questions is</p>
  
  <p>Using jQuery ..etc Is there a way to determine the number of <code>li</code> for each row</p>
  
  <h3>Code</h3>
  
  <pre><code>&lt;ul&gt;
   &lt;li&gt;A&lt;/li&gt;
   &lt;li&gt;B&lt;/li&gt;
   &lt;li&gt;C&lt;/li&gt;
   &lt;li&gt;D&lt;/li&gt;
   &lt;li&gt;E&lt;/li&gt;
   &lt;li&gt;F&lt;/li&gt;
   &lt;li&gt;G&lt;/li&gt;
   &lt;li&gt;H&lt;/li&gt;
   &lt;li&gt;I&lt;/li&gt;
   &lt;li&gt;J&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <h3>Style</h3>
  
  <pre><code>ul,li{margin:0 0;padding:0 0;}
  ul li{display:inline;float:left}
  </code></pre>
  
  <p>For my resolution li's upto F makes one row and the rest makes another like below. I would like a jquery way to get number of elements ( which is 6 in my case ) in row 1.</p>
  
  <pre><code>A B C D E F
  G H I J
  </code></pre>
  
  <h3>Context</h3>
  
  <p>I am adding keyboard events to navigate to each folder(li) using left,right,top,down. Left right is as simple as highlighting next and previous li's. Top and down keys need to go to next row and above row. Now you will get it :)</p>