diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/position/position_core.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/unit/position/position_core.js b/tests/unit/position/position_core.js index 3976e43ab..426231ee3 100644 --- a/tests/unit/position/position_core.js +++ b/tests/unit/position/position_core.js @@ -131,6 +131,17 @@ test('of', function() { $('#elx').position({ my: 'right bottom', at: 'right bottom', + of: $(document), + collision: 'none' + }); + same($('#elx').offset(), { + top: $(document).height() - 10, + left: $(document).width() - 10 + }, 'document'); + + $('#elx').position({ + my: 'right bottom', + at: 'right bottom', of: window, collision: 'none' }); @@ -139,6 +150,17 @@ test('of', function() { left: $(window).width() - 10 }, 'window'); + $('#elx').position({ + my: 'right bottom', + at: 'right bottom', + of: $(window), + collision: 'none' + }); + same($('#elx').offset(), { + top: $(window).height() - 10, + left: $(window).width() - 10 + }, 'window'); + $(window).scrollTop(500).scrollLeft(200); $('#elx').position({ my: 'right bottom', |