aboutsummaryrefslogtreecommitdiffstats
path: root/tests/visual/tooltip
diff options
context:
space:
mode:
authorjzaefferer <joern.zaefferer@gmail.com>2010-10-21 21:03:48 +0200
committerjzaefferer <joern.zaefferer@gmail.com>2010-10-21 21:03:48 +0200
commit732a485676a1dcbefc16fdb9d26774b622410138 (patch)
tree230c7abf756946913df09f9d58cfba7ed5663463 /tests/visual/tooltip
parent96977edecc134d9212a304a1236e823237e8e274 (diff)
downloadjquery-ui-732a485676a1dcbefc16fdb9d26774b622410138.tar.gz
jquery-ui-732a485676a1dcbefc16fdb9d26774b622410138.zip
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.
Diffstat (limited to 'tests/visual/tooltip')
-rw-r--r--tests/visual/tooltip/tooltip.html21
1 files changed, 21 insertions, 0 deletions
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 @@
<div id="ajax" style="width: 100px;" class="ui-widget-content" title="never be seen">
gets its content via ajax
</div>
+ <div id="ajax2" style="width: 100px;" class="ui-widget-content" title="never be seen">
+ gets its content via ajax, caches the response
+ </div>
<div id="context2" class="ui-widget ui-widget-content">
<span title="something" style="border:1px solid blue">span</span>