Search code examples
javascriptjquerytooltip

tooltip with delay is not working on ie


i have a button and i want to show a tooltip after user clicked on it. i have the following code:

$(document).ready(function(){
    $('.doc-clipboard-btn').tooltip({ trigger: 'click' });
});

and it works perfectly in IE,but when i set the delay option it wont work in IE anymore

$(document).ready(function(){
        $('.doc-clipboard-btn').tooltip({trigger: 'click' , delay: {show: 500, hide: 100}}); 
    });

any help would be appreciate


Solution

  • Tried the following in IE 11.0.51 and it works. Please specify your libraries (Bootstrap, jQuery) versions and browser version to properly debug your issue.

    $(document).ready(function(){
        $('[data-toggle="tooltip"]').tooltip({
          trigger: 'click',
          delay: {show: 500, hide: 100}
        });
    });
    <link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0/css/bootstrap.css" rel="stylesheet"/>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0/js/bootstrap.bundle.min.js"></script>
    
    <button type="button" class="btn btn-secondary" data-toggle="tooltip" data-placement="bottom" title="Tooltip on bottom">
      Tooltip on bottom
    </button>