Skip to content

Commit 674b751

Browse files
Callum KerrAurelioDeRosa
Callum Kerr
authored andcommitted
jQuery.offset: Add a link to .position()
Closes jquerygh-875
1 parent 6eece50 commit 674b751

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

entries/offset.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</signature>
99
<desc>Get the current coordinates of the first element in the set of matched elements, relative to the document.</desc>
1010
<longdesc>
11-
<p>The <code>.offset()</code> method allows us to retrieve the current position of an element <em>relative to the document</em>. Contrast this with <code>.position()</code>, which retrieves the current position <em>relative to the offset parent</em>. When positioning a new element on top of an existing one for global manipulation (in particular, for implementing drag-and-drop), <code>.offset()</code> is more useful.</p>
11+
<p>The <code>.offset()</code> method allows us to retrieve the current position of an element <em>relative to the document</em>. Contrast this with <code><a href="/position/">.position()</a></code>, which retrieves the current position <em>relative to the offset parent</em>. When positioning a new element on top of an existing one for global manipulation (in particular, for implementing drag-and-drop), <code>.offset()</code> is more useful.</p>
1212
<p><code>.offset()</code> returns an object containing the properties <code>top</code> and <code>left</code>.</p>
1313
<div class="warning">
1414
<p><strong>Note:</strong> jQuery does not support getting the offset coordinates of hidden elements or accounting for borders, margins, or padding set on the body element.</p>

0 commit comments

Comments
 (0)