Hi an alle. Ich habe ein Problem mit einem Tooltip. Mir wird bei dem jetzigen code in der categorie.php das erste bild eines pots beim lindrüber fahren angezeigt. Jedoch ist es dann bei jedem link das gleiche bild. Vllt könnt ihr mir helfen.

Hier ist der code:
javascript
:
PHP-Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Beispiel</title>
<style type="text/css">
.tooltip { color: #000000; background-color: #f5f5ff; display: none; border: solid 1px #0b198c; position:absolute; width: 160px; z-index:10}
</style>
<script type="text/javascript">
<!--
wmtt = null;
var x, y;
document.onmousemove = updateWMTT;
function updateWMTT(e){
x = (!e) ? window.event.x + document.body.scrollLeft : e.pageX;
y = (!e) ? window.event.y + document.body.scrollTop: e.pageY;
if(typeof document.body.scrollLeft=='number'){
w = document.body.scrollLeft + document.body.clientWidth;
h = document.body.scrollTop + document.body.clientHeight
}
else if(typeof window.pageYOffset=='number'){
w = window.pageXOffset+window.innerWidth;
h = window.pageYOffset+window.innerHeight
}
t = y + 20;
l = x + 20;
if(wmtt){
if(t + wmtt.offsetHeight > h) wmtt.style.top = y - 20 - wmtt.offsetHeight + 'px';
else wmtt.style.top = t + "px";
if(l + wmtt.offsetWidth > w) wmtt.style.left = w - 20 - wmtt.offsetWidth+'px';
else wmtt.style.left = l + "px";
}
}
function showWMTT(id){
wmtt = document.getElementById(id);
wmtt.style.display = "block";
}
function hideWMTT(){
wmtt.style.display = "none";
}
//-->
</script>
</head>
<body>
<div class="tooltip" id="d1">
<?php the_thumb();?>
</div>
PHP:
PHP-Code:
<ul class="arrow">
<li>
<a href="<?php the_permalink(); ?>" onMouseOver="showWMTT('d1')" onMouseOut="hideWMTT()"> <?php the_title(); ?></a>
</li>
</ul>
Beide codes sind inerhalb des Loops. Jedoch wie schon gesagt das Bild des ersten angezeigten Links wir auch bei allen anderen Links angezeigt.
danke schon mal im voraus.