JQuery: get the element that's on the middle of the visible screen, while scrolling the page
<p>I need to know if there is a way I can determine if a div is in the center of the screen.</p>

<p>My HTML is as bellow:</p>

<pre><code>&lt;div id="container"&gt;
 &lt;div class="box" id="box0"&gt;
  text
 &lt;/div&gt;
 &lt;div class="box" id="box1"&gt;
  text
 &lt;/div&gt;

 .....

 &lt;div class="box" id="box100"&gt;
  text
 &lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>Is there a way to determine when a div will be in the center of the visible screen, considering that the page is scrollable? So basically, when the user is scrolling down the page, the div that's in the middle of the visible screen should be selected.</p>

<p>Thanks</p>
