I'm looking for a short jQuery snippet to count how many divs I can have horizontally in my browser window. Basically, I'm using a fluid layout, like this:
<div id="wrapper"> <div id="content"> <div class="foo" /> <div class="foo" />
Wrapper is 100% width, and foo about 250px wide. What's the simplest way to determine how many there can be in a single row? I prefer flexibility. If wrapper is changed to some fixed width in CSS, it should still work.