diff options
Diffstat (limited to 'demos/position')
-rw-r--r-- | demos/position/cycler.html | 40 | ||||
-rw-r--r-- | demos/position/default.html | 2 |
2 files changed, 14 insertions, 28 deletions
diff --git a/demos/position/cycler.html b/demos/position/cycler.html index 490d88fcb..16542b962 100644 --- a/demos/position/cycler.html +++ b/demos/position/cycler.html @@ -1,54 +1,40 @@ -<!DOCTYPE html> +<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>jQuery UI Position - Default functionality</title> <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css"> - <script src="../../jquery-1.7.2.js"></script> + <script src="../../jquery-1.8.0.js"></script> <script src="../../ui/jquery.ui.core.js"></script> <script src="../../ui/jquery.ui.widget.js"></script> <script src="../../ui/jquery.ui.position.js"></script> <link rel="stylesheet" href="../demos.css"> - <style> - html, body { - margin: 0; - padding: 0 - } - </style> <script> $(function() { // TODO refactor into a widget and get rid of these plugin methods - $.fn.position2 = function( options ) { - return this.position( $.extend({ - of: window, - using: function( to ) { - $( this ).css({ - top: to.top, - left: to.left - }) - }, - collision: "none" - }, options)); - } - $.fn.left = function( using ) { - return this.position2({ + return this.position({ my: "right middle", at: "left+25 middle", + of: window, + collision: "none", using: using }); - } + }; $.fn.right = function( using ) { - return this.position2({ + return this.position({ my: "left middle", at: "right-25 middle", + of: window, + collision: "none", using: using }); - } + }; $.fn.center = function( using ) { - return this.position2({ + return this.position({ my: "center middle", at: "center middle", + of: window, using: using }); }; @@ -68,7 +54,7 @@ $( "img:eq(2)" ).right(); function animate( to ) { - $(this).stop( true, false ).animate( to ); + $( this ).stop( true, false ).animate( to ); } function next( event ) { event.preventDefault(); diff --git a/demos/position/default.html b/demos/position/default.html index 35004b993..7c15c8037 100644 --- a/demos/position/default.html +++ b/demos/position/default.html @@ -4,7 +4,7 @@ <meta charset="utf-8"> <title>jQuery UI Position - Default functionality</title> <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css"> - <script src="../../jquery-1.7.2.js"></script> + <script src="../../jquery-1.8.0.js"></script> <script src="../../ui/jquery.ui.core.js"></script> <script src="../../ui/jquery.ui.widget.js"></script> <script src="../../ui/jquery.ui.mouse.js"></script> |