Skip to content

Commit

Permalink
Updating unit tests for offset
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonaaron committed May 15, 2008
1 parent c5f4d70 commit 2c2a625
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions test/data/offset/fixed.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@
<div id="fixed-2" class="fixed"></div>
<div id="forceScroll"></div>
<div id="marker"></div>
<p class="instructions">Click the white box to move the marker to it.</p>
</body>
</html>
2 changes: 1 addition & 1 deletion test/data/offset/scroll.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@
</div>
<div id="forceScroll"></div>
<div id="marker"></div>
<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>
<p class="instructions">Click the white box to move the marker to it.</p>
</body>
</html>
2 changes: 2 additions & 0 deletions test/data/offset/static.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
$(function() {
$('.static').click(function() {
$('#marker').css( $(this).offset() );
var pos = $(this).position();
$(this).css({ position: 'absolute', top: pos.top, left: pos.left });
return false;
});
});
Expand Down
2 changes: 1 addition & 1 deletion test/data/offset/table.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@
</tbody>
</table>
<div id="marker"></div>
<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>
<p class="instructions">Click the white box to move the marker to it.</p>
</body>
</html>

0 comments on commit 2c2a625

Please sign in to comment.