});
test( "offsets", function() {
- expect( 7 );
+ expect( 9 );
+
+ var offset;
$( "#elx" ).position({
my: "left top",
of: "#parentx",
collision: "none"
});
- deepEqual( $( "#elx" ).offset(), { top: 65, left: 37 }, "decimal percentage offsets in my" );
+ offset = $( "#elx" ).offset();
+ equal( Math.round( offset.top ), 65, "decimal percentage offsets in my" );
+ equal( Math.round( offset.left ), 37, "decimal percentage offsets in my" );
$( "#elx" ).position({
my: "left+10.4 top-10.6",
of: "#parentx",
collision: "none"
});
- deepEqual( $( "#elx" ).offset(), { top: 49, left: 50 }, "decimal offsets in my" );
+ offset = $( "#elx" ).offset();
+ equal( Math.round( offset.top ), 49, "decimal offsets in my" );
+ equal( Math.round( offset.left ), 50, "decimal offsets in my" );
$( "#elx" ).position({
my: "left+right top-left",