# Ajax pagination with will\_paginate and jQuery

**URL:** <https://www.ruby-forum.com/t/ajax-pagination-with-will-paginate-and-jquery/130090>\
**Category:** Rails\
**Created:** [February 25, 2008, 10:54am UTC](https://www.ruby-forum.com/t/ajax-pagination-with-will-paginate-and-jquery/130090 "2008-02-25T10:54:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmcervera](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/51bf81/32.png) [@jmcervera](https://www.ruby-forum.com/u/jmcervera)\
**Post date:** [February 25, 2008, 10:54am UTC](https://www.ruby-forum.com/t/ajax-pagination-with-will-paginate-and-jquery/130090/1 "2008-02-25T10:54:17Z")

</div>

Hello,

I am trying to use the plugin will\_paginate with jQuery, as it is  
explained in  
[http://ozmm.org/posts/ajax\_will\_paginate\_jq\_style.html](http://ozmm.org/posts/ajax_will_paginate_jq_style.html).

ItÂ´s very easy.  
It works well on firefox, but has an interesting problem with IE.  
First time it works, it makes an ajax query to find the records for the  
page, but the second time ite makes two ajax calls, the next time four,  
eight and so on.

The code use the livequery plugin for binding the click event to the  
paginator labels automatically on each page.

Query(document).ready(function($) {  
$(â€˜div.pagination aâ€™).livequery(â€˜clickâ€™, function() {  
$(â€™#mainâ€™).load(this.href) return false  
})  
})

Nothing else. I think the problem is not with jQuery, but in the  
rendering of the template, especified in the controller, that it is not  
working well on IE.

does anybody know something about this?  
I’ll appreciate if someone could try this, and tell me something.

Thank you very much.
