title: Undefined function in object literal scroll
body: <p>Hi Im trying to make an image gallery similar to instagram that loads images on scroll. Im trying it as an object literal variable but am getting an undefined method for this.showPics...  getMore is called from an ajax success method. Is this a scope issue because of the scroller being called in the .scroll? How should I do this? BTW showPics is defined I just didnt paste it in.. Thanks</p>
  
  <pre><code>var Pics{
      showPics: function() {
          //loop thru images
      }
      scroller: function() {
          if ($(window).scrollTop() + $(window).height() == $(document).height()) {
              this.showPics();
          }
      }
      getMore: function(){
          $(window).scroll(this.scroller);
      }
  }
  </code></pre>