Giant Cranes wrote:> Hi,
>
> I would like to jump to an anchor on a page once an AJAX action has been
> performed (a new page of data has been returned and I would like to
> present the top of this list to the user).
>
> Is there a way to specify an anchor in link_to_remote? If not, is there
> something that I can do in the RJS template?
>
> Thanks,
> GiantCranes
I''ve found that typically you can add :html=>{} block to edit most
HTML
related elements. in this case you can add :html =>{:href =>
"#anchor_name"} to your link_to_remote.
example :
link_to_remote "link text", :update => "element",
:html => {:href => "#bottom_anchor"},
:url => { :controller => "your_controller",
:action => "your_action"},
:loading =>
"$(''spinner'').show();"
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---