I have used this: That does not work. I have added both of urs suggestion.. but it did not work!
svg
{
width:720px;
height:50px;
border:#999999 solid 2px;
}
.
You can add it as below:
title.classList.add("tooltip");
Here is the DEMO
UPDATE:
Check this Updated Demo
There were some console errors which I have cleared.
Just copy and paste the javascript
part as it is in your page and see that class will be added now. One major change was that you were adding class to title along with .
like title.classList.add('.tooltip');
but it should have been without .
like title.classList.add('tooltip');
Check the demo and let me know!!