Onmousover Element

Hi,

I’m a little baffled. I’m trying to swap the CSS class when a user
mouses over/out of a link. The idea seems simple enough, but I’m
getting what seems to be a incorrect error message from Fireboug.

Here’s the error message:
$(“section-one”).toggleClassName is not a function

It’s as if protoype is not loaded, which it is.

Here the code:

<%= link_to_remote ‘Show’,
{:url => {:controller => :dashboard ,
:action => ‘show’ ,
:id => organization.id } },
{:class => ‘workspaceNav’,
:onmouseover => “$(‘section-three’).toggleClassName(‘workspace-index-
item-container-selected’)”,
:onmouseout => “$(‘section-three’).toggleClassName(‘workspace-index-ite
m-container-selected’)” }
-%>

I’ve also tried the following:

<%= link_to_remote ‘Do’,
{ :url => {:controller => :dashboard ,
:action => ‘do’ ,
:id => organization.id }},
{ :class => ‘workspaceNav’,
:onmouseover =>
“Element.toggleClassName(‘section-two’,
‘workspace-index-item-container-selected’)”,
:onmouseout => “Element.toggleClassName(‘section-two’,
‘workspace-index-item-container-selected’)” }
-%>