Prototype - toggle function doesn't complete

Hello!

I’m trying to create a list menu. When the user clicks on the list
header the other elements should appear. My function looks like this:

My list menu looks like this:

  • <%= link_to "Dam", :action => category=('female') %>

  • <%= link_to "Accessoarer", :action => category=('female_accessories') %>

  • etc...

The function starts but when the page has loaded it stops.

The function works when I try this:

Event.observe(window, ‘load’, function() {
toggle_div(‘female_categories’);
});

So I think the problem is in my Event.observe.

Any tips would be greatly appreciated!

// Anders

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs