Hi, Friends, I am new to Ruby On Rails, I want to implement show and hide div on mouseover and mouseout events, I have tried by various ways using .rjs(Ruby Javascript) and Ajax also but its not working smoothly as I want. (I have created some Rss links and on mouseover event I want to show its related links in the div below and on mouseover event of the div below I want to hide the div.) Please Help me give me proper solution, If I got any code it will be the best solution for me. Regards, Kiran P. PolawarKiranD-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org -- 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 -~----------~----~----~----~------~----~------~--~---
*Problem with show and hide div on mouse events<http://www.ruby-forum.com/topic/127744#569797> * Hi, Friends, I am new to Ruby On Rails, I want to implement show and hide div on mouseover and mouseout events, I have tried by various ways using .rjs(Ruby Javascript) and Ajax also but its not working smoothly as I want. (I have created some Rss links and on mouseover event I want to show its related links in the div below and on mouseover event of the div below I want to hide the div.) Please Help me give me proper solution, If I got any code it will be the best solution for me. Regards, Kiran P. PolawarKiranD-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
randomutterings-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Oct-12 14:59 UTC
Re: Problem with show and hide div on mouse events
I''m using 2 partials and a remote function to do this. I''m
sure you
can modify this for what you need.
layout.rhtml
------------------------------
<div id=''menu''>
<%= render ''home/hide_menu'' %>
</div>
------------------------------
_hide_menu.rhtml
-------------------------------
<div onMouseover="<%= remote_function :update =>
''menu'', :url =>
{:controller => ''home'', :action =>
''menu''}, :before =>
"Element.show(''spinner'')", :complete =>
"Element.hide(''spinner'')" %>"
onClick="<%= remote_function :update => ''menu'',
:url => {:controller
=> ''home'', :action => ''menu''}, :before
=>
"Element.show(''spinner'')", :complete =>
"Element.hide(''spinner'')"
%>">Menu </div>
-------------------------------
menu.rhtml
-------------------------------
<div id="menu_content" onClick="<%= remote_function :update
=>
''menu'', :url => {:controller =>
''home'', :action =>
''hide_menu''}, :before =>
"Element.show(''spinner'')", :complete =>
"Element.hide(''spinner'')" %>">
#my menu items go here
</div>
__________________
home_controller.rb
-------------------------------
def menu
render :layout=>false
end
def hide_menu
render :layout=>false
end
--------------------------------
On Oct 12, 2:28 am, "Kiran Polawar"
<polawarkir...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> *Problem with show and hide div on mouse
> events<http://www.ruby-forum.com/topic/127744#569797>
> *
>
> Hi,
>
> Friends, I am new to Ruby On Rails, I want to implement show and hide
> div on mouseover and mouseout events, I have tried by various ways using
> .rjs(Ruby Javascript) and Ajax also but its not working smoothly as I
> want.
>
> (I have created some Rss links and on mouseover event I want to show its
> related links in the div below and on mouseover event of the div below I
> want to hide the div.)
>
> Please Help me give me proper solution, If I got any code it will be the
> best solution for me.
>
> Regards,
>
> Kiran P.
> PolawarKir...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
randomutterings-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:> I''m using 2 partials and a remote function to do this. I''m sure you > can modify this for what you need. >> > home_controller.rb > ------------------------------- > def menu > render :layout=>false > end > > def hide_menu > render :layout=>false > end > --------------------------------Thanks for the help I think it will definately useful for me......... -- 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 -~----------~----~----~----~------~----~------~--~---