Reputation: 1042
currently I am using Jquery to append text on to tooltip like this;
$('#test').attr('title', $('#test').attr('title') + ' text to append');
What I would like to know is, how can I achieve this via javascript?
Any help is welcomed, I did some research but had no luck.
Easy Tooltip content change via Javascript
Changing the tooltip of button dynamically in html
Upvotes: 2
Views: 125
Reputation: 1082
Check this it work same like you have done in jquery
document.getElementById("test").title = document.getElementById("test").title + 'text to append';
Upvotes: 3