W3C home > Mailing lists > Public > www-svg@w3.org > May 2002

Change CSS class with set

From: Rick Anderson <rianders@rci.rutgers.edu>
Date: Sun, 5 May 2002 22:24:31 -0400 (EDT)
To: www-svg@w3.org
Message-ID: <Pine.GSO.4.44.0205052215130.19664-100000@amenti.rutgers.edu>

How can one change the "class" attribute using set?

I have a CSS embedded stylesheet with the following rule:
 .FillGreen {
    fill: green;
 .FillOrange {
    fill: orange;

I have a button:
<g id="button1" >
<use id="button1a" xlink:href="#tbutton1"  x="0" y="0"
	width="54" height="18" class="FillOrange" >

     <set id="SetMouseover" attributeName="class"  to="FillGreen"
        begin="button1a.mouseover" end="button1a.mouseout" />


This doesn't work but when actually use the set element to modify the
"fill" attribute the desired affect occurs.

<set id="SetMouseover2" xlink:href="#button2a"
attributeName="fill"  to="green"
        begin="button2a.mouseover" end="button2a.mouseout" />

--Rick Anderson
"With that amount of fixing it really ought to be better."
Received on Sunday, 5 May 2002 22:24:32 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:29:17 UTC