enyo / opentip

Opentip is an open source javascript tooltip based on the protoype framework.
http://www.opentip.org
1.25k stars 401 forks source link

Add 'timeout' as a hideTrigger? #90

Open mkasson opened 10 years ago

mkasson commented 10 years ago

I'm creating and later showing an Opentip programmatically. I'd like it to go away after 5 sec. I've tried the various options with no success in making that happen.

I've also tried opentip.show().delay(5000).hide(); with no luck.

Any help would be appreciated.

Perhaps add timeout as a hideTrigger?

Thanks!

mkasson commented 10 years ago

Easy enough with javascript's setTimeout. Using showOn: null, hideTrigger: "tip". And all is well in tablet-land.

    invalidDataTip.show();
    window.setTimeout(function () { invalidDataTip.hide(); }, 5000);