hnchuong-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Mar-06 04:25 UTC
"Animation for waiting..." effect on Expanding a tree
Hi all, I would like to implement a popular effect: + click on (+) symbol of tree node to expand its children - the children will be read from DB. + the tree show an animation in place of (+) symbol as waiting state. + when the children has been read and fully displayed, the animation would be replace by the (-) symbol. How could I implement that effect? Thank you --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
hnchuong wrote:> I would like to implement a popular effect: > + click on (+) symbol of tree node to expand its children - the > children will be read from DB. > + the tree show an animation in place of (+) symbol as waiting state. > + when the children has been read and fully displayed, the animation > would be replace by the (-) symbol. > > How could I implement that effect?Briefly, I suspect you could use <ul><li></li></ul> for the list. Then make each <li> clickable, and set the list node style via dynamic CSS. A Google of [ul style css image] returns this: <UL STYLE="list-style-image: url(green_bullet.gif)"> Prototype pokes styles like this $("wiki_panel").setStyle({"width":"50%"}) So just whomp in a spinning GIF, and you are done. BTW making the dot itself spin ... is a good idea. Thanks! -- Phlip http://www.greencheese.us/ZeekLand <-- NOT a blog!!! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---