Google Groups Home
Help | Sign in
Message from discussion ReassignafterAjax in jq lowpro
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
michelson  
View profile
 More options 21 Apr, 04:11
From: michelson <miguelmichel...@gmail.com>
Date: Sun, 20 Apr 2008 20:11:48 -0700 (PDT)
Local: Mon 21 Apr 2008 04:11
Subject: ReassignafterAjax in jq lowpro
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' });
        });

and in my controller:

@artists =  Role.artists.users.top_artists(50).paginate  :page =>
params[:page],:per_page => 8

    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?

regards


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google