Hi,

I have this code below.

<div id="mutsu" class="apple"></div>

<script type="text/javascript">

function mifuncion(){

        if($('mutsu').toggleClassName('pear')) {
                alert('div has CSS apple class.');
        }

}

</script>


<a href="#" onClick="mifuncion();">   Click here </a>

After cliking on "Click here" the class of the <div> doesnt change to "pear" but to "apple pear". I expected it to change to "pear". What should do i change the class just to "pear"?

Regards

Javi



-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.


Reply via email to