jQuery Image fadeIn Upon Scroll Inside DIV
<p>I can't get the actually LazyLoad plugin to work for me so I am trying to write my own with. Currently I have a list of images loading inside of a DIV. They are pulled by a PHP query to the mysql database. The DIV scroll is set to auto. The code I am using is:</p>

<pre><code>&lt;div id="b1" style="overflow:auto;"&gt;
&lt;?PHP $result = mysql_query("SELECT * FROM images");

while($row = mysql_fetch_assoc($result)) {

echo "&lt;img src='$row[photo]' style='display:none'&gt; &lt;br&gt;";

}

&lt;/div&gt;

&lt;script type="text/javascript"&gt;
function imgCheck() {
var position        = $("img").offset().top;            
var scrollCheck       = $("#b1").scrollTop() + $("#b1").height();
if ( scrollCheck &gt; position) {
  $("img").fadeIn("fast");
   }


$("#b1").scroll( function() { imgCheck() } );
&lt;/script&gt;
</code></pre>

<p>Although this is not quite working for me. Could anyone help me out or shoot out some suggestions?</p>
