Hi,

> I expected it to change to "pear". What
> should do i change the class just to "pear"?

$('mutsu').className = 'pear';

`className` is a standard property containing a space-delimited list
of all of the class names on the element.
--
T.J. Crowder
Independent Software Consultant
tj / crowder software / com
www.crowdersoftware.com


On Jan 16, 2:23 pm, Javier Garcia <tirengar...@gmail.com> wrote:
> 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