Hallo,
ich habe eine kleine Frage.
Ich schaffe es die div´s aus dem bilder ticker zu öffenen und wieder zu schliessen. was ich leider nicht hinbekomme ist, dass sich "toggleText" schliesst wenn sich "toggleText_1" öffnet?
danke
simily
super danke!
toggle1
ich habe eine kleine Frage.
Ich schaffe es die div´s aus dem bilder ticker zu öffenen und wieder zu schliessen. was ich leider nicht hinbekomme ist, dass sich "toggleText" schliesst wenn sich "toggleText_1" öffnet?
danke
simily
Code:
<script language="javascript">
function toggle2() {
var ele = document.getElementById("toggleText_1");
var imageEle = document.getElementById("displayText_1");
if(ele.style.display == "block") {
ele.style.display = "none";
imageEle.innerHTML = '<img src="http://..../DSCF5554.JPG" border=0 width="200" height="187">';
}
else {
ele.style.display = "block";
imageEle.innerHTML = '<img src="http://..../DSCF5554.JPG" border=0 width="200" height="187">';
}
}
</script>
<script language="JavaScript" type="text/javascript">
function rotate(mode)
{
var sSpeed = 7;
var sWidth = '300px';
var sHeight = '100%';
var direction = 'up'; // up|down|left|right
var splitter = '<br>'; // <br>|
var sElem = document.getElementById('rotation');
if(mode == 'stop')
{
sElem.scrollAmount = 0;
return;
}
else if(mode == 'start')
{
sElem.scrollAmount = sSpeed;
return;
}
var rotations = new Array();
rotations[0] = '<a id="displayText" href="javascript:toggle1();"><img src="http://..../DSCF5696.JPG" border=0 width="200" height="187"></a>'
rotations[1] = '<a id="displayText_1" href="javascript:toggle2();"><img src="http://.../DSCF5554.JPG" border=0 width="200" height="187"></a>'
rotations[2] = '<a href="http://www.crawler.de/" target="_blank"><img src="./crawler1.gif" border=0></a>'
rotations[3] = '<a href="http://www.yahoo.de/" target="_blank"><img src="./doyou.gif" border=0></a>'
rotations[4] = '<a href="http://www.fireball.de/" target="_blank"><img src="./fireball.gif" border=0></a>'
rotations[5] = '<a href="http://www.dino-online.de/" target="_blank"><img src="./dino.gif" border=0></a>'
rotations[6] = '<a href="http://www.infoseek.com/" target="_blank"><img src="./infoseek.gif" border=0></a>'
rotations[7] = '<a href="http://www.spider.de/" target="_blank"><img src="./spiderlo.gif" border=0></a>'
rotations[8] = '<a href="http://www.stpt.com/" target="_blank"><img src="./stpoint.gif" border=0></a>'
rotations[9] = '<a id="displayText" href="javascript:toggle1();"><img src="http://.../DSCF5696.JPG" border=0 width="200" height="187"></a>'
rotations[10] = '<a id="imageDivLink" href="javascript:toggle();"><img src="/wp-includes/images/minus.png"></a></a>'
document.writeln('<marquee id="rotation" direction="'+ direction +'"></marque>');
with(document.getElementById('rotation'))
{
scrollAmount = sSpeed;
style.width = sWidth;
style.height = sHeight;
onmouseover = new Function("rotate('stop')");
onmouseout = new Function("rotate('start')");
for(i=0; i<rotations.length;++i)
innerHTML += rotations[i] + splitter;
}
}
</script>
<div>
<script>rotate();</script>
</div>
<div id="toggleText" style="display: none"><h1>test</h1></div>
<div id="toggleText_1" style="display: none"><h1>test000000</h1></div>
super danke!
toggle1
Code:
<script language="javascript">
function toggle1() {
var ele = document.getElementById("toggleText");
var imageEle = document.getElementById("displayText");
if(ele.style.display == "block") {
ele.style.display = "none";
imageEle.innerHTML = '<img src="http://..../DSCF5696.JPG" border=0 width="200" height="187">';
}
else {
ele.style.display = "block";
imageEle.innerHTML = '<img src="http://..../DSCF5696.JPG" border=0 width="200" height="187">';
}
}
</script>