title: How can I get the position of an element with jQuery after a successful Ajax Call?
body: <p>I am trying to create sort of a lazyloaded event with jQuery upon the container being scrolled to a certain position. This is supposed to happen after a successful ajax request, but I am having trouble getting the code to work here. Here is my code:</p>
  <pre><code>$.ajax({
      url: load.php,
      type: 'GET',
      cache: true,
      success: function(data) {
          $('#container').html(data)
      }
      });
  
  
  $('#container').live('scroll', function() {  
  var position = $(&quot;#load&quot;).offset().top;          
  var scrollPosition = $('#container').height(); +$('#container').scrollTop();
  if ( scrollPosition &gt; position) {
       alert( &quot;ALERT&quot; );
                                }
  });
  </code></pre>
  <p>Can anyone help me out here please. Any help would be greatly appreciated.</p>