You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While it is possible to get the coordinates of elements with visibility:hidden set, display:none is excluded from the rendering tree and thus has a position that is undefined.
The jQuery docs state, that
The return value of
undefined
was changed a few years ago in jquery/jquery#2396 due to jquery/jquery#2310. The tests are here.Now a value of
{ top: 0, left: 0 }
is returned instead (https://github.com/jquery/jquery/blob/a684e6ba836f7c553968d7d026ed7941e1a612d8/src/offset.js#L88)and
undefined
is only returned for an empty jQuery object (https://github.com/jquery/jquery/blob/a684e6ba836f7c553968d7d026ed7941e1a612d8/src/offset.js#L79).The text was updated successfully, but these errors were encountered: