Ich habe zwei div- Elemente, wo ich jeweils die Klassen tauschen möchte bei Klick auf das rechte Element. Ich habe das schon mi className probiert. Das hatte soweit ein bisschen funktioniert - allerdings sprang das im Opera zum Beispiel einfach nur kurz hin und her - war aber nicht von Dauer.
C:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<script type="text/javascript">
function change_cat(cat)
{
/** ? **/
}
</script>
<style>
.cat_akt{
width: 129px;
height: 22px ;
background-color: blue;
float: left;
font-weight: bold;
text-align: center;
padding-top:8px;
margin-bottom:-1px;
}
.cat_akt a{color: white;}
.cat_other{
width: 129px;
height: 20px;
_height: 27px; /* für den IE */
background-color:red;
float: right;
font-weight: bold;
text-align: center;
padding-top:6px;
margin:2px 0 0 0;
}
.cat_other a{color: Black;}
</style>
</head>
<body>
<div id="eins" class="cat_akt"><a href="#" onclick="change_cat('eins');">eins</a></div>
<div id="zwei" class="cat_other"><a href="#" onclick="change_cat('zwei');">zwei</a></div>
</body>
</html>