I have a site which used jquery 1.x.... Now, I have started using jquery 3.x in this site..... to solve any migration issues, I have installed JQMigrate.
One of the messages it shows in console window is "JQMIGRATE: jQuery.fn.offset() requires an element connected to a document".
I am not sure how I can solve it. The only thing that is said as a "solution" is: "Do not attempt to get or set the offset information of invalid input."
That is obvious, but what does it mean in practice? if I have, for example,
var parentOffset = $offsetParent.offset();
Should I write that line something like this?
var parentOffset = $offsetParent ? $offsetParent.offset() : 0;
Is it really necessary since I know that $offsetParent is always a valid input.
Regards Jaime