       # set up doofinder controller
       client = new doofinder.Client mock.request.hashid, mock.request.api_key,5,null,'fooserver'
       queryInputWidget = new doofinder.widgets.QueryInput '#query'
-      @scrollWidget = new doofinder.widgets.ScrollResults '#scroll'
+      @scrollWidget = new doofinder.widgets.ScrollResults '#scroll', scrollOffset: 95
       @controller = new doofinder.Controller client, [queryInputWidget]
       # the els in questionr
       @scrollContainer = @$ '#scroll'

      queryEl.val 'sill'
      queryEl.trigger 'keydown'

    it ' calls nextPage when df:scroll is triggered', (done)->
      scrollContainer = @scrollContainer
      scrollContainer.css position: 'relative', height: '800px', overflow: 'auto'
      content = scrollContainer.find('div').first()

        done()

      scrollContainer.one 'df:scroll', ()->
        # df:scroll is after nextPage, if it happened
        # no nextPage called
        nextPageCalled.should.be.false
        # now we move the scroll to the "nextPage" limit
        scrollContainer.scrollTop 305
        # and trigger df:scroll again. this time, nextPage should be called
        scrollContainer.trigger 'df:scroll'

      # set scrollbar one pixel below the limit
      scrollContainer.scrollTop 304
      # and trigger the event
      scrollContainer.trigger 'df:scroll'


      scrollContainer.on 'DOMSubtreeModified', ()->
        # scroll is on top, no nextPage should be called after this
