简体   繁体   中英

Hide jquery tool-tip after sometime, even if the mouse is still over the element

I want that the tooltip should hide automatically after few seconds.Even if the mouse is over the element, still the tooltip must hide after sometime. I am using the jquery tooltip pluggin.

Add setTimeout to open event:

$( '#field' ).tooltip(
  open: function( event, ui ) {
    setTimeout(function(){ 
      $( '#field' ).tooltip( "close" );
    }, 3000);
  })
;

fiddle

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM