im using the JQuery Lowpro, im trying to make an ajax will_paginate
links in a rails proyect, i have the following code in application.js
:
jQuery(function($) {
$('div.pagination a').attach(Remote.Link, { type: 'GET', dataType:
'script' });
});
> im using the JQuery Lowpro, im trying to make an ajax will_paginate
> links in a rails proyect, i have the following code in application.js
> :
> jQuery(function($) {
> $('div.pagination a').attach(Remote.Link, { type: 'GET', dataType:
> 'script' });
> });
> respond_to do |format|
> format.html # index.html.erb
> format.js do
> render :update do |page|
> page.replace_html 'photos', :partial => "photos"
> end
> end
> end
> and the ajax call works!, but only for one time, since the ajax page
> loads the links works like normal links and not like Remote.links.
> i think that`s because the paginate links are loaded into the called
> page, and I not declaring the ReassignafterAjax, is this correct?.
> if that is the problem, how can I declare this behavior in jqlowpro?
> On 20 Apr, 22:11, michelson <miguelmichel...@gmail.com> wrote: > > Hi there,
> > im using the JQuery Lowpro, im trying to make an ajax will_paginate > > links in a rails proyect, i have the following code in application.js > > : > > jQuery(function($) { > > $('div.pagination a').attach(Remote.Link, { type: 'GET', dataType: > > 'script' }); > > });
> On 20 Apr, 22:11, michelson <miguelmichel...@gmail.com> wrote: > > Hi there,
> > im using the JQuery Lowpro, im trying to make an ajax will_paginate > > links in a rails proyect, i have the following code in application.js > > : > > jQuery(function($) { > > $('div.pagination a').attach(Remote.Link, { type: 'GET', > dataType: > > 'script' }); > > });
Hi, is me again, the solution that Wynn gave works great in Firefox, but im noted that in IE dont work, it only alow me to paginate one time , and since the ajax call is made, the other calls response with errors.
the IE console only show an error sintax in line 1 of my called page.
> > On 20 Apr, 22:11, michelson <miguelmichel...@gmail.com> wrote: > > > Hi there,
> > > im using the JQuery Lowpro, im trying to make an ajax will_paginate > > > links in a rails proyect, i have the following code in application.js > > > : > > > jQuery(function($) { > > > $('div.pagination a').attach(Remote.Link, { type: 'GET', > dataType: > > > 'script' }); > > > });
miguelmichel...@gmail.com> wrote: > Hi, is me again, the solution that Wynn gave works great in Firefox, but > im noted that in IE dont work, it only alow me to paginate one time , and > since the ajax call is made, the other calls response with errors.
> the IE console only show an error sintax in line 1 of my called page.
> anyone had the same problem?
> regards
> On Mon, Apr 21, 2008 at 10:56 AM, Dan Webb <d...@danwebb.net> wrote:
> > Cheers Wynn, you beat me to it!
> > On Mon, Apr 21, 2008 at 3:52 PM, Wynn Netherland > > <wynn.netherl...@gmail.com> wrote:
> > > Oops, I think I replied privately. Posting again here for the benefit > > > of the group:
> > > Be sure you have livequery referenced in your <HEAD> before lowpro:
> > > On 20 Apr, 22:11, michelson <miguelmichel...@gmail.com> wrote: > > > > Hi there,
> > > > im using the JQuery Lowpro, im trying to make an ajax will_paginate > > > > links in a rails proyect, i have the following code in > > application.js > > > > : > > > > jQuery(function($) { > > > > $('div.pagination a').attach(Remote.Link, { type: 'GET', > > dataType: > > > > 'script' }); > > > > });
> > > > respond_to do |format| > > > > format.html # index.html.erb > > > > format.js do > > > > render :update do |page| > > > > page.replace_html 'photos', :partial => "photos" > > > > end > > > > end > > > > end
> > > > and the ajax call works!, but only for one time, since the ajax > > page > > > > loads the links works like normal links and not like Remote.links.
> > > > i think that`s because the paginate links are loaded into the > > called > > > > page, and I not declaring the ReassignafterAjax, is this correct?.
> > > > if that is the problem, how can I declare this behavior in > > jqlowpro?