I am trying to show the validations notice and error messages in my page ..
In my layout i have
and in my helper def flash_notice
render(:partial => 'shared/notice', :object => flash[:notice]) if flash[:notice]
end
ANd in my partial
<%= javascript_tag "$('notification_message').visualEffect('SlideDown');" %> <%= update_page_tag do |page| page.delay(4) do
if page['notification_message'].visible
page['notification_message'].visual_effect :slide_up
end
end
end %>
where page['notification_message'].visible is showing error while loading.. showign the error as page['notification_message'].visible is not a function
I have loaded jquery 1.4.js prototype still then its not worki开发者_如何学运维ng
You should use visible in a selectore like this:
$("div.selector:visible").something()
this wil give you all the div's with a class 'selector" that are visible.
I can't really figure out what you want tod do with this coden so I hope this is a relevant answer.
精彩评论