I am trying to use JQuery Tooltipster in my Asp.net MVC application.
The content I am trying t add the tooltip to is generated dynamically through JavaScript.
View:
var engName = document.getElementsByClassName("dhx_matrix_scell");
for (var i = 0; i < engName.length; i++) {
engName[i].className = engName[i].className + " tooltip";
engName[i].title = "Hello";
}
top of my index:
$(document).ready(function () {
$('.tooltip').tooltipster(
{
multiple: true
});
});
The tooltip does work, but it doesn't appear in the right spot, and it doesnt display the element that uses the tooltip class.
Pic for reference:
so I figured out my problem! I was also using a Bootstrap.css link in my project as well, and there was a mismatch between the class names "tooltip"
I changed the name to "tooltips" and it initialized it as such, and it worked flawlessly!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With