Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JQuery Tooltipster hiding element it's attached to

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: enter image description here

like image 840
Stephen Sugumar Avatar asked Jul 04 '14 18:07

Stephen Sugumar


1 Answers

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!

like image 124
Stephen Sugumar Avatar answered Oct 02 '22 15:10

Stephen Sugumar