Hi there,
can anybody tell me what''s wrong with this controller part...?
render :update do |page|
page.call "jQuery(''html,body'').animate({
scrollTop:jQuery(''#top'').offset().top}, 2000)"
end
The error I get is...
"RJS error:
TypeError: jQuery("html,body").animate({
scrollTop:jQuery("#top").offset().top}, 2000) is not a
function"
The idea is to have the controller "smooth scroll" to the DIV with the
ID ''top'' (which would contain the error message).
(Nothing else besides the jQuery core is needed with this code.)
Thanks for any help!
Tom
--
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.