1

Question on Meteor and Jquery. I'm trying to build a page that will slowly scroll down a set of photos endlessly and at a constant speed. Right now the code below will scroll down but it is not at a constant speed and will stop halfway down according the the current 1000 that is set.

Can someone else me figure out a way to modify this code to have it endlessly move down the page slowly?

Template.currentTag.rendered = function () {
    $('body').animate({ scrollTop: 1000,
      easing: 'linear'}, 10000);
      return false;
};

The container layout is simply:

<template name="layout">
    <div id="container">
        {{> currentTag}}
    </div>
</template>

And each currentTag template is setup as follows:

<template name="currentTag">
  {{#each Tag}}     
    <div class="item">
      <img src="{{ images.standard_resolution.url }}">
    </div>  
  {{/each}}
</template>

Thanks in advance!

sokeefe
  • 627
  • 12
  • 33
  • Hey. What version of Meteor are you using? Also what do you mean by "endlessly" scrolling? should it load new items in the "Tag" helper? – nathan-m Aug 31 '14 at 11:20
  • I'm using the newest version (0.9.0.1) of Meteor. And yes, you're right that there will need to be a load function once the page gets close to the end. I'm just trying to figure out how to have the Jquery scroll down to the bottom of the page right now. Once that is working I'll start building the call to load more photos once the scroll is past a certain point. Hope that makes sense. – sokeefe Sep 01 '14 at 18:42
  • Related: http://stackoverflow.com/questions/1890995/jquery-scroll-to-bottom-of-page-iframe – nathan-m Sep 01 '14 at 22:25

0 Answers0