Is it possible dynamically insert tooltip? I was trying to do that but it isnt working. Thank you for answers. Here is my code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns=http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script src=http://cdn.jquerytools.org/1.1.2/jquery.tools.min.js"></script>
<script>
$(document).ready(function() {
$("#demo a[title]").tooltip('#demotip');
});
function loadAnnotations(){
var b = document.createElement('a');
b.setAttribute("title", "content");
b.innerHTML = "word";
var node=document.getElementById("pointer");
node.appendChild(b);
}
</script>
<style>
#demotip {
display:none;
background-color:#009966;
font-size:12px;
padding:25px;
color:#FFFFFF;
}
</style>
</head>
<body onload="loadAnnotations();">
<br>
<br>
<br>
<br>
<br>
<br>
<!-- the tooltip -->
<!-- and the triggers -->
<div id="demo">
<div id="pointer"></div>
</div>
<div id="demotip"> </div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns=http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script src=http://cdn.jquerytools.org/1.1.2/jquery.tools.min.js"></script>
<script>
$(document).ready(function() {
$("#demo a[title]").tooltip('#demotip');
});
function loadAnnotations(){
var b = document.createElement('a');
b.setAttribute("title", "content");
b.innerHTML = "word";
var node=document.getElementById("pointer");
node.appendChild(b);
}
</script>
<style>
#demotip {
display:none;
background-color:#009966;
font-size:12px;
padding:25px;
color:#FFFFFF;
}
</style>
</head>
<body onload="loadAnnotations();">
<br>
<br>
<br>
<br>
<br>
<br>
<!-- the tooltip -->
<!-- and the triggers -->
<div id="demo">
<div id="pointer"></div>
</div>
<div id="demotip"> </div>
</body>
</html>
