r3466 committed - tooltip: simulate ajax request delay to show "Loading.." while the req...

r3466 committed - tooltip: simulate ajax request delay to show "Loading.." while the req...

Revision: 3466
Author: joern.zaefferer
Date: Wed Nov 18 08:19:39 2009
Log: tooltip: simulate ajax request delay to show "Loading.." while the
request is still going on, then update the tooltip when the response is
there
http://code.google.com/p/jquery-ui/source/detail?r=3466
Added:
/branches/dev/tests/visual/tooltip/ajaxcontent.php
Deleted:
/branches/dev/tests/visual/tooltip/ajaxcontent.html
Modified:
/branches/dev/tests/visual/tooltip/default.html
=======================================
--- /dev/null
+++ /branches/dev/tests/visual/tooltip/ajaxcontent.php    Wed Nov 18 08:19:39
2009
@@ -0,0 +1,2 @@
+<?php sleep(1); ?>
+<strong>Hello</strong> world!
=======================================
--- /branches/dev/tests/visual/tooltip/ajaxcontent.html    Sat Sep 26 04:12:14
2009
+++ /dev/null
@@ -1,1 +0,0 @@
-<strong>Hello</strong> world!
=======================================
--- /branches/dev/tests/visual/tooltip/default.html    Sun Nov 15 22:35:30 2009
+++ /branches/dev/tests/visual/tooltip/default.html    Wed Nov 18 08:19:39 2009
@@ -8,7 +8,6 @@
    <script type="text/javascript"
src="../../../ui/jquery.ui.core.js"></script>
    <script type="text/javascript"
src="../../../ui/jquery.ui.position.js"></script>
    <script type="text/javascript"
src="../../../ui/jquery.ui.tooltip.js"></script>
-    <script type="text/javascript"
src="http://jqueryui.com/themeroller/themeswitchertool/"></script>
    <script type="text/javascript">
    $(function() {
        $.fn.themeswitcher && $('<div/>').css({
@@ -38,7 +37,8 @@
            // asynchronous content
            $("#ajax").tooltip({
                content: function(response) {
-                    $.get("ajaxcontent.html", response);
+                    $.get("ajaxcontent.php", response);
+                    return "Loading...";
                }
            });
--