diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2011-05-07 15:18:29 +0200 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2011-05-07 15:18:29 +0200 |
commit | a2674a2c6b93667ce0c1f5891c2566690fb59c97 (patch) | |
tree | 1fcbea7d1cef3a9194cb91f79448a0c18f6d94c0 | |
parent | f7e8331e260a03d0ccc286deeeb7bf878f078ff4 (diff) | |
download | jquery-ui-a2674a2c6b93667ce0c1f5891c2566690fb59c97.tar.gz jquery-ui-a2674a2c6b93667ce0c1f5891c2566690fb59c97.zip |
Tooltip/Popup: Improve video-player demo
-rw-r--r-- | demos/tooltip/video-player.html | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/demos/tooltip/video-player.html b/demos/tooltip/video-player.html index 473c6a6a3..70a83b626 100644 --- a/demos/tooltip/video-player.html +++ b/demos/tooltip/video-player.html @@ -10,24 +10,34 @@ <script type="text/javascript" src="../../ui/jquery.ui.tooltip.js"></script> <script type="text/javascript" src="../../ui/jquery.ui.button.js"></script> <script type="text/javascript" src="../../ui/jquery.ui.menu.js"></script> + <script type="text/javascript" src="../../ui/jquery.effects.core.js"></script> + <script type="text/javascript" src="../../ui/jquery.effects.blind.js"></script> <script type="text/javascript" src="../../tests/visual/menu/popup.js"></script> <link type="text/css" href="../demos.css" rel="stylesheet" /> <script type="text/javascript"> $(function() { function notify( input ) { var msg = "Selected " + $.trim($(input).text()); - $("<div/>").appendTo(document.body).text(msg).addClass("notification ui-state-highlight").position({ - my: "center top+20", + $("<div/>").appendTo(document.body).text(msg).addClass("notification ui-state-default ui-corner-bottom").position({ + my: "center top", at: "center top", of: window - }).delay(1000).fadeOut("slow", function() { + }).show({ + effect: "blind" + }).delay(1000).hide({ + effect: "blind", + duration: "slow" + }, function() { $(this).remove(); }); } $("ul").menu({ select: function(event, ui) { - // stop button from handling the click + // TODO stop button from handling the click $(this).popup("close"); + // TODO should probably be handled by poup, see ESCAPE key handler + // affects key handling + $(this).prev().focus(); notify(ui.item); } }).popup(); @@ -75,7 +85,7 @@ .set { display: inline-block; } - .notification { position: absolute; display: inline-block; font-size: 2em; padding: 1em; border-radius: 15px; box-shadow: 2px 2px 5px -2px rgba(0,0,0,0.5); } + .notification { position: absolute; display: inline-block; font-size: 2em; padding: .5em; box-shadow: 2px 2px 5px -2px rgba(0,0,0,0.5); } </style> </head> <body> |