1

I am trying to use jQuery's plugin so as to achieve a twitter sort of scrolling; meaning that when i reach the bottom, by clicking a button the next page is loaded. I have the basic code added:

$('#content').infinitescroll({
    navSelector  : "div.navigation",            
    nextSelector : "div.navigation a:first",    
    itemSelector : "#content div.message"          
});

When my page loads, the previous script is executed. This is my view code, where each item that would be a "post", is of class "message".

    foreach($messages as $post): ?>
        <div class="message" style="margin-top:10px;">
        <?php 
           if ($post->parent_message_id==null){
               $this->renderPartial('_messageView',array(
                    'data'=>$post,
                    'ligaId'=>$model->id,
                   ));
           }
        ?> 
        </div>
        <?php 
    endforeach; ?>

I have really no idea how to implement this... how to use this extension. Anybody has used it?

Soph
  • 2,815
  • 5
  • 35
  • 67
  • Uhm, so you got the basic code, what exactly is your problem? It doesnt load anything? Or what? Did you try debugging with firebug, see if ajax requests are made or if there are any javascript errors? – Max Oct 05 '11 at 08:54

0 Answers0