summaryrefslogtreecommitdiff
path: root/src/main/webapp/jquery-ui-1.9pre/tests/unit/position/position_deprecated.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/webapp/jquery-ui-1.9pre/tests/unit/position/position_deprecated.js')
-rw-r--r--src/main/webapp/jquery-ui-1.9pre/tests/unit/position/position_deprecated.js32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/main/webapp/jquery-ui-1.9pre/tests/unit/position/position_deprecated.js b/src/main/webapp/jquery-ui-1.9pre/tests/unit/position/position_deprecated.js
new file mode 100644
index 0000000..3e72c4a
--- /dev/null
+++ b/src/main/webapp/jquery-ui-1.9pre/tests/unit/position/position_deprecated.js
@@ -0,0 +1,32 @@
+(function( $ ) {
+
+test( "offset", function() {
+ $( "#elx" ).position({
+ my: "left top",
+ at: "left bottom",
+ of: "#parentx",
+ offset: "10",
+ collision: "none"
+ });
+ same( $( "#elx" ).offset(), { top: 70, left: 50 }, "single value" );
+
+ $( "#elx" ).position({
+ my: "left top",
+ at: "left bottom",
+ of: "#parentx",
+ offset: "5 -3",
+ collision: "none"
+ });
+ same( $( "#elx" ).offset(), { top: 57, left: 45 }, "two values" );
+
+ $( "#elx" ).position({
+ my: "left top",
+ at: "left bottom",
+ of: "#parentx",
+ offset: "5px -3px",
+ collision: "none"
+ });
+ same( $( "#elx" ).offset(), { top: 57, left: 45 }, "with units" );
+});
+
+}( jQuery ) );