Does anyone know a little coffescript to help me with this method?
renderContent: ->
$listContent = $ "<div/>", class: "me-list-content"
$ul = $ "<ul/>"
qtd = 6
key = 0
$(window).scroll ->
if $(window).scrollTop() + 1 >= $(document).height() - $(window).height()
console.log @itens
while key < qtd
item = @itens[key];
$item = $ @renderItem(item)
$item.appendTo $ul
key++
$ul.appendTo $listContent;
$listContent
I basically need the @itens variable to assume your collection within the jquery's native scroll function.