From 568f9163b005ff9f1c65ec8ba52bda528fdcc1f1 Mon Sep 17 00:00:00 2001 From: Louis Ameline Date: Mon, 6 Mar 2017 14:38:50 +0100 Subject: [PATCH] Suggest an asynchronous task --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 470660d..3615df4 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,13 @@ Or: $.tooltipster.startSelectable( $('#myelement').next(), function(instance, selectedText) { - return $(' Hello world'); + + // some kind of asynchronous task + setTimeout(function() { + instance.content('My tooltip content'); + }, 2000); + + return $(' Loading...'); } ); ```