I am clear on the difference between .offset()
and .position()
in jquery (as outlined here), however I am confused about how these map to javascript functions. Based on this article it seems like .offsetTop
in javascript does the same thing as .position().top
in jquery. Is that true? If so, how do you get the behavior of .offset()
in javascript? If not, how do you get the behavior of .position()
?
Thanks!