jQuery error $('...').tooltip is not a function [Orlando-patch3]

Ricardo46
Kilo Contributor

Hi all,

After the upgrade to Orlando, a calendar widget with embedded modals just lost functionality. The Date/time fields wich were auto-populated now cannot be filled anymore. The browser console shows a log message with the following text:

jQuery.Deferred exception: $(...).tooltip is not a function TypeError: $(...).tooltip is not a function
    at HTMLDocument.<anonymous>

I've searched and re-arranging the dependencies didn't worked for me. This is the depencencies we are using for the widget.

find_real_file.png

The CSS is only a fullcalendar css dependency. I've tried also including bootstrap and popper, and I think the error is becouse somewhere in the code, ServiceNow includes 

$(document).ready(function() {
$('body').tooltip({
selector: '[data-toggle="tooltip"]'
});
});

Any suggestions to keep using jQuery without remodeling all the code of the widget? We need jQuery to access dates with moment and other look&feel changes that are much more difficult using DOM.

 

Thank you.

5 REPLIES 5

The code is just searching everything under the body tag so the issue maybe that its returning nothing which is causing it to error.  So adding a title tag to your HTML for the widget may get it to go away.

But it sounds like you do not know for sure what the issue is.  You have an error and it could be what you did or something ServiceNow did and either way your widget is not working properly.  So to that end I would pull your widget from the page and see if the error continues.  If it does not add the widget back drop your jQuery includes from your widget and see if it still works and if the error goes away.  That may tell you something.