 
       remaining = containerTop - elementTop
       shouldScroll = remaining <= height(container) * scrollDistance + 1
+      load = ->
+        if (attrs.infiniteScrollCallback?)
+          scope.infiniteScrollCallback((count)->
+
+            container.scrollTop(container.scrollTop() + count * lineHeight)
+          )
+        else
+          scope.infiniteScrollReverse()
 
       if shouldScroll
         checkWhenEnabled = true
 
         if scrollEnabled
           if scope.$$phase || $rootScope.$$phase
-            scope.infiniteScrollReverse()
+            load()
           else
-            scope.$apply(scope.infiniteScrollReverse)
+            scope.$apply load
       else
         if checkInterval then $interval.cancel checkInterval
         checkWhenEnabled = false

    infiniteScrollDisabled: '='
    infiniteScrollUseDocumentBottom: '=',
    infiniteScrollListenForEvent: '@'

  link: (scope, elem, attrs) ->
    windowElement = angular.element($window)

    infiniteScrollContainer: '='
    infiniteScrollDistance: '='
    infiniteScrollDisabled: '='
    infiniteScrollUseDocumentBottom: '='
    infiniteScrollListenForEvent: '@'
    infiniteScrollLineHeight: '='
    infiniteScrollCallback: '='

  link: (scope, elem, attrs) ->
    windowElement = angular.element($window)
