Skip to content

Commit 2c2a625

Browse files
committed
Updating unit tests for offset
1 parent c5f4d70 commit 2c2a625

File tree

4 files changed

+5
-2
lines changed

4 files changed

+5
-2
lines changed

test/data/offset/fixed.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,6 @@
2828
<div id="fixed-2" class="fixed"></div>
2929
<div id="forceScroll"></div>
3030
<div id="marker"></div>
31+
<p class="instructions">Click the white box to move the marker to it.</p>
3132
</body>
3233
</html>

test/data/offset/scroll.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@
3434
</div>
3535
<div id="forceScroll"></div>
3636
<div id="marker"></div>
37-
<p class="instructions">Click the white box to move the marker to it. Clicking the box also changes the position to absolute (if not already) and sets the position according to the position method.</p>
37+
<p class="instructions">Click the white box to move the marker to it.</p>
3838
</body>
3939
</html>

test/data/offset/static.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
$(function() {
1616
$('.static').click(function() {
1717
$('#marker').css( $(this).offset() );
18+
var pos = $(this).position();
19+
$(this).css({ position: 'absolute', top: pos.top, left: pos.left });
1820
return false;
1921
});
2022
});

test/data/offset/table.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@
3838
</tbody>
3939
</table>
4040
<div id="marker"></div>
41-
<p class="instructions">Click the white box to move the marker to it. Clicking the box also changes the position to absolute (if not already) and sets the position according to the position method.</p>
41+
<p class="instructions">Click the white box to move the marker to it.</p>
4242
</body>
4343
</html>

0 commit comments

Comments
 (0)