From 732a485676a1dcbefc16fdb9d26774b622410138 Mon Sep 17 00:00:00 2001 From: jzaefferer Date: Thu, 21 Oct 2010 21:03:48 +0200 Subject: Tooltip: Adding another ajax example to visual testcase. Fixing async response handling (taking IE cached response quirk into account) and simplifying fade animations a ton. --- tests/visual/tooltip/tooltip.html | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'tests/visual/tooltip') diff --git a/tests/visual/tooltip/tooltip.html b/tests/visual/tooltip/tooltip.html index 022093bc7..7b931b155 100644 --- a/tests/visual/tooltip/tooltip.html +++ b/tests/visual/tooltip/tooltip.html @@ -44,6 +44,24 @@ return "Loading..."; } }); + // asynchronous content with caching + var content; + $("#ajax2").tooltip({ + content: function(response) { + if (content) { + return content; + } + $.ajax({ + url: "ajaxcontent.php", + cache: false, + success: function(result) { + content = result; + response(result); + } + }); + return "Loading..."; + } + }); // custom position $("#right2").tooltip({ @@ -117,6 +135,9 @@
gets its content via ajax
+
+ gets its content via ajax, caches the response +
span -- cgit v1.2.3