I found it wasn't the position() call after all, it was a previous call using css "calc". This CSS function is not supported in QTWebkit, which PhantomJS uses. Worth knowing.
jQuery position() and PhantomJS
-
29-06-2023 - |
Question
I'm currently running a Jasmine spec that checks the DOM position of some elements after running some logic on them. Works in all browsers except PhantomJS, which returns NaN for both .left and .top on any .position() call. Has anyone else seen this?
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow