jquery-3.6.min.js:2 jQuery.Deferred exception: $(...).tooltip is not a function TypeError: $(...).tooltip is not a function
From the error message, it seems that you are using the JQuery UI tooltip plugin, and you forgot import the JQuery UI reference.
Try to import the JQuery UI reference before using the tooltip method.
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender)
{
await _jsRunTime.InvokeAsync<IJSObjectReference>("import", "./js/bootstrap.bundle.min.js");
await _jsRunTime.InvokeAsync<IJSObjectReference>("import", "./js/jquery-3.6.min.js");
//add the jquery ui reference.
await JS.InvokeAsync<IJSObjectReference>("import", "https://code.jquery.com/ui/1.13.2/jquery-ui.js");
await _jsRunTime.InvokeAsync<IJSObjectReference>("import", "./js/wheel-zoom.min.js");
await _jsRunTime.InvokeAsync<IJSObjectReference>("import", "./js/app.js");
}
}
Besides, you should also add the JQuery UI CSS reference in the _Host.cshtml page (header).
<link rel="stylesheet" href="//code.jquery.com/ui/1.13.2/themes/base/jquery-ui.css">
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best regards,
Dillion