Hi, I'm struggling to find suitable alternatives for methods in Prototype (converting to JQuery) and wondered if you guys could offer suitable replacements.
The RJS code I'm refactoring is:
if request.post? && @success
page << "window.location.href='/news'"
else
page.replace_html :user_overlay, :partial => 'login'
if @error_msg.blank?
page.visual_effect :appear, 'user_overlay', :duration => '0.7'
else
page.replace_html 'overlay_messages', @error_msg
page.visual_effect :highlight, 'overlay_messages', :startcolor => "#404040", :endcolor => "#666666"
end
It's loaded via a partial, and replaces elements in a div [login errors], we're running Ruby on Rails with JQuery.