Hallo Leute,
Ich habe ein Problem:
Ich möchte mit Jquery ein Tooltipp programmieren, welcher bei meinen Kalender über entsprechende Events angezeigt wird.
Das Script funktioniert auch. Leider nur im Firefox. Da Ich mit meinen Latein am Ende bin wollte ich fragen ob vlt. einer von euch
eine Idee woran das liegen kann.
Hier das script:
PHP-Code:
<script type="text/javascript">
$('.calendar-day a').live({
mouseenter:function(e){
var tip =$(this).attr('title');
$(this).attr('title',' ');
$(this).append('<div id="tooltip"><div class="toolheader"></div><div class="toolbody">'+tip+'</div></div>');
$('#tooltip').css("top",e.pageY+20);
$('#tooltip').css("left",e.pageX+20);
$('#tooltip').fadeIn('1000');
},
mousemove: function(e){
$('#tooltip').css("top",e.pageY +20);
$('#tooltip').css("left",e.pageX +20);
},
mouseleave: function(){
$(this).attr('title',$('.toolbody').html());
$(this).children('div#tooltip').remove();
}
});
</script>
Die CSS
Code:
#tooltip{
position:absolute;
z-index:999;
color:#000;
font-size:19px;
width:250px;
display:none;
background-color:#ededed;
border-weight:2px;
border-style:solid;
padding:10px;
}
#tooltip.toolheader{
height:8px;
}
#tooltip.toolbody{
background-color:#000;
padding:5px;
}
Dankeschön