jsfiddle example of what i am trying
<div class="name1" title=" Air jordan ">mike jordan</div>
thats my html .
I want to change the tooltip dynamically to say "air jordan 12:44pm is mike jordan" i know how to get the 12:44pm. what i dont know is how to change the tooltip dynamically while reading the original element. I have to change the title element in order to change the tooltip right?
here is what I am trying
$( ".name1" ).tooltip({
content: function() {
console.log("1234");
var element = $( this );
return "gerd";
}
});
I feel like i am going down a very wrong path. I dont even see the console logs inside of the function. Is there a way to fix this?
Or Should I 1. see if the element has a mouseenter, 2. then quickly change the title attritubte then 3 add a .tooltip?