05-20-2012, 03:20 AM
Incearca asta, e mai oky de aplicat:
PHP Code:
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
function infoBox(boxSelector, elementSelector){
$(elementSelector).mousemove(function(e){
$(boxSelector).show("fast");
var top = e.pageY + 20;
var left = e.pageX + 20;
$(boxSelector).css("top", top);
$(boxSelector).css("left", left);
});
$(elementSelector).mouseout(function(e){
$(boxSelector).hide("fast");
});
}
infoBox('#box', '#start');
infoBox('#box', '#start2');
});
</script>
<style>
#box{
display:none;
border:1px solid #000;
position:fixed;
left:10px;
top:10px;
right:auto;
bottom:auto;
}
</style>
</head>
<body>
<div id="box">
Mouse tip
</div>
<div id="start">Text predefinit</div>
<div id="start2">Text diferit</div>
</body>
</html>

