Hi I have a HTML div block with an ID and I want to toggle the div with the className "extra" in the div block. I''m trying to use Prototype''s toggle() function and it is not working... Could anyone tell if if there is something wrong in my code? Here is the page http://mofstudios.com/maxime/test/test.html Click the "More info" on the right side of each block to call the javascript function. Thank you, Maxime --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Your problem is in the CSS file, http://www.prototypejs.org/api/element/toggle take a look, On Thu, Feb 7, 2008 at 7:57 AM, Maxime <mpcaissy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Hi I have a HTML div block with an ID and I want to toggle the div > with the className "extra" in the div block. I''m trying to use > Prototype''s toggle() function and it is not working... > > Could anyone tell if if there is something wrong in my code? > > Here is the page > http://mofstudios.com/maxime/test/test.html > > Click the "More info" on the right side of each block to call the > javascript function. > > Thank you, > Maxime > > >-- {a human being that was given to fly} --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
and the toggle function function toggle_extra(e){ $(e).up(3).down(''.extra'').toggle(); } On Thu, Feb 7, 2008 at 9:00 AM, Elden <willy.d7-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Your problem is in the CSS file, > > http://www.prototypejs.org/api/element/toggle > > take a look, > > > On Thu, Feb 7, 2008 at 7:57 AM, Maxime <mpcaissy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Hi I have a HTML div block with an ID and I want to toggle the div > > with the className "extra" in the div block. I''m trying to use > > Prototype''s toggle() function and it is not working... > > > > Could anyone tell if if there is something wrong in my code? > > > > Here is the page > > http://mofstudios.com/maxime/test/test.html > > > > Click the "More info" on the right side of each block to call the > > javascript function. > > > > Thank you, > > Maxime > > > > > > > > > -- > {a human being that was given to fly}-- {a human being that was given to fly} --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Thanks! On Feb 7, 10:19 am, Elden <willy...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> and the toggle function > > function toggle_extra(e){ > $(e).up(3).down(''.extra'').toggle(); > } > > > > On Thu, Feb 7, 2008 at 9:00 AM, Elden <willy...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Your problem is in the CSS file, > > >http://www.prototypejs.org/api/element/toggle > > > take a look, > > > On Thu, Feb 7, 2008 at 7:57 AM, Maxime <mpcai...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Hi I have a HTML div block with an ID and I want to toggle the div > > > with the className "extra" in the div block. I''m trying to use > > > Prototype''s toggle() function and it is not working... > > > > Could anyone tell if if there is something wrong in my code? > > > > Here is the page > > >http://mofstudios.com/maxime/test/test.html > > > > Click the "More info" on the right side of each block to call the > > > javascript function. > > > > Thank you, > > > Maxime > > > -- > > {a human being that was given to fly} > > -- > {a human being that was given to fly}--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hey Maxime, Sounds like you''re really looking for the "toggleClassName" function. The toggle function just effects the objects style.display property. http://www.prototypejs.org/api/element/toggleClassName Cheers, Matt On Feb 7, 10:46 am, Maxime <mpcai...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Thanks! > > On Feb 7, 10:19 am, Elden <willy...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > and the toggle function > > > function toggle_extra(e){ > > $(e).up(3).down(''.extra'').toggle(); > > } > > > On Thu, Feb 7, 2008 at 9:00 AM, Elden <willy...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Your problem is in the CSS file, > > > >http://www.prototypejs.org/api/element/toggle > > > > take a look, > > > > On Thu, Feb 7, 2008 at 7:57 AM, Maxime <mpcai...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Hi I have a HTML div block with an ID and I want to toggle the div > > > > with the className "extra" in the div block. I''m trying to use > > > > Prototype''s toggle() function and it is not working... > > > > > Could anyone tell if if there is something wrong in my code? > > > > > Here is the page > > > >http://mofstudios.com/maxime/test/test.html > > > > > Click the "More info" on the right side of each block to call the > > > > javascript function. > > > > > Thank you, > > > > Maxime > > > > -- > > > {a human being that was given to fly} > > > -- > > {a human being that was given to fly}--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---