This is a migrated thread and some comments may be shown as answers.

Hide tooltip after a period of time

1 Answer 456 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Dan
Top achievements
Rank 1
Iron
Iron
Veteran
Dan asked on 11 Oct 2018, 01:55 PM

I need to show a tooltip on the items of a dropdownlist. However I would like for the tooltip to close after one second. I looked on the telerik forums and it seems that it exists but only for ajax AutoCloseDelay

Can this be achieved also in kendo UI for jQuery?

1 Answer, 1 is accepted

Sort by
0
Veselin Tsvetanov
Telerik team
answered on 15 Oct 2018, 11:39 AM
Hi Dan,

You are right that AutoCloseDalay configuration is currently not available out-of -the-box for the Tooltip widget. Nevertheless, similar functionality could be achieved by setting the autoHide configuration option to false and handling the show event of the widget:
list.kendoTooltip({
  autoHide: false,
  filter: '.k-item',
  content: function(e) {
    var target = e.target;
     
    return target.text();
  },
  show: function(e) {
    var closeButton = $('.k-tooltip .k-i-close');
 
    if (closeButton.length > 0) {
      setTimeout(function() {
        closeButton.click();
      }, 1000);
    }
  }
});

Here you could a small sample implementing the above suggestion.

Regards,
Veselin Tsvetanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
ToolTip
Asked by
Dan
Top achievements
Rank 1
Iron
Iron
Veteran
Answers by
Veselin Tsvetanov
Telerik team
Share this question
or