When the title tag is appended dynamically with text, the title tag content is not showing dynamically in mouseover of the text, but if the same title tag is given in code (statically) it is working fine.
Can any one help me out here?
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
<script>
function appendTitle() {
try {
var node = document.createElement("title");
node.innerText = "I love SVG";
document.getElementById("abcd").appendChild(node);
} catch (e) {
}
}
</script>
</head>
<body>
<svg height="30" width="200">
<text x="0" y="15" fill="red" id="abcd">
I love SVG!
</text>
</svg>
<button onclick="appendTitle()">click</button>
</body>