Railscasts를 따라 Rails 앱에서 무한 스크롤을했습니다.텍스트를 coffeescript로 바꾸기
jQuery ->
if $('.pagination').length
$(window).scroll ->
url = $('.pagination .next_page a').attr('href')
if url && $(window).scrollTop() > $(document).height() - $(window).height() - 150
$('.pagination').text("Fetching more")
$.getScript(url)
$(window).scroll()
는 여기에 커피 스크립트 파일이며 텍스트에 "더 가져 오기"페이지 하단에 도착했을 때 볼 수있다. 이 파일을 내 파일에있는 GIF로 바꾸려면 어떻게해야합니까 ??? /assets/load.gif