Error of kendo tooltip

1 Answer 306 Views
ToolTip
Miro
Top achievements
Rank 1
Iron
Iron
Miro asked on 28 May 2021, 07:37 AM
I have attached the error, using the kendo tooltip error, and a sample of my code as well.
Miro
Top achievements
Rank 1
Iron
Iron
commented on 28 May 2021, 07:39 AM

when I use mouseover on the numbers on ToolTip2 picture. I got the error
Petar
Telerik team
commented on 02 Jun 2021, 07:18 AM

Check the attached project to my reply in the thread and let me know if you need further assistance.

1 Answer, 1 is accepted

Sort by
0
Petar
Telerik team
answered on 02 Jun 2021, 07:17 AM

Hi Miro,

I've used your code in the attached project. To make the Tooltip work as expected I've used the following avatarTooltip definition. 

function avatarTooltip() {
    $("div").on("mouseover", ".avatar-tooltip", function () {
        console.log($(this));
        var tooltip = $(this).data("kendoTooltip");
        console.log(tooltip);

        if (tooltip == undefined) {
            tooltip = $(this).kendoTooltip({
                content: $(this).text(),
                position: "top",
                autoHide: true
            });

            tooltip.data("kendoTooltip").show();
        } 
    })
}

The main modification I made is the code in yellow. The other change is that the line that calls the show method of the Tooltip is moved inside the if statement.  

Check the implementation in the attached project and let me know if you have any questions about it. 

Regards,
Petar
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Miro
Top achievements
Rank 1
Iron
Iron
commented on 03 Jun 2021, 01:40 AM

Thanks, it's working now.
Petar
Telerik team
commented on 03 Jun 2021, 04:33 AM

You are welcome!
Tags
ToolTip
Asked by
Miro
Top achievements
Rank 1
Iron
Iron
Answers by
Petar
Telerik team
Share this question
or