Hey, hab hier ein kleines Problem.
Was ich machen möchte?
2 Div Container, wenn ich mit der maus über den
div Container A fahre >Fährt< div container B ein.
<head>
function leftbar(status)
{
if (status=="over")
{
document.getElementById("A").width = "0px";
}
}
</head>
<body>
<div id="A" >
</div>
<div id="B" onMouseover="leftbar('over')">
</div>
</body>
Extern CSS
#left{
widrh: 200px
position: absolute;left: 0px; top: 0px;bottom: 0px;
background-color: #666666;
float: left;
}
#bar{
width: 15px;
position: absolute;left: 200px; top: 0px;bottom: 0px;right: 0px;
float: left;
background-color: #A00000;
}
Das ganze soll dann später eine animation werden.
Da ich mit Js noch am anfang steht, wäre es hilfreich
wenn ihr mir eine kurze grund anleitung gäbt.
Sprich nimm ne for schleife und ... ;=)
Hatte hier schonmal einen andern beitrag in dem erwähnt wurde das
die for schleife ungeeignet für animationen sei!?
Allerdings nicht warum und was die alternative wäre, while?
Vielen dank für eure ZEIT und Hilfe