How to fix .offset error when upgrading from jQuery 1.3.2 -> 1.4.2
-
18-09-2019 - |
Question
I just upgraded jQuery to version 1.4.2 and I am now getting an error on this line
var offset = $(settings.textBoxObj).offset({padding: true, border: true});
Before I upgraded I was not getting this error. Does anyone know if something changed in 1.4 to affect this line of code?
Metropolis
Solution
Your line is completely wrong.
In jQuery 1.3.x, offset
didn't take any parameters, so your object was ignored.
In 1.4, offset
allows you to move an element, so it expects an object with left
and top
properties.
You need to figure out what the parameter was trying to accomplish or remove it completely.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow