title: How to load content in jscroll dynamically?
body: <p>I have a controller in codeigniter which loads the posts like:</p>
  
  <pre><code>public function loadpost($pg, $count = 2) {
      $offset = ($pg - 1)*$count;
  
      $this-&gt;load-&gt;model('posts');
      $posts = $this-&gt;posts-&gt;fetch_post($offset,$count);
      foreach ($posts as $post_item) {
          $data['post_item'] = $post_item;
          $t = $post_item['timestamp'];
          $telap = $this-&gt;time_elapsed($t);
          $data['time'] = $telap;
          $this-&gt;load-&gt;view('posts', $data);
      }
  }
  </code></pre>
  
  <p>The "view" post is such that it uses the forwarded data and displays them like</p>
  
  <pre><code>&lt;script type="text/javascript" src="&lt;?php echo base_url(); ?&gt;scripts/infiscroll.js"&gt;&lt;/script&gt;
  &lt;div id="jscroll-container" class="jscroll"&gt;
  &lt;div class="row"&gt;Lots of content lines&lt;/div&gt;
  &lt;div&gt;
  </code></pre>
  
  <p>The file infiscroll.js makes a simple call to the jscroll function like:</p>
  
  <pre><code>$(document).ready(function () {
  $('.jscroll').jscroll();
  });
  </code></pre>
  
  <p>So when i continue scrolling it loads the same content again and again(which is what I expected since I am not changing the values). However what I am trying to figure out is where I can call the loadpost() function with the updated values so that the scrolling causes to load new post values. I could not find any documentation on how the view file, which calls the jscroll, is to be designed. Hence I'm looking forward to this community for guidance on how the initiation can be done as I'm totally new to jscroll and have no clue on how it can be used.</p>