Bootstrap tooltips not working

前端 未结 25 1783
孤城傲影
孤城傲影 2020-11-28 17:46

I\'m going mad here.

I\'ve got the following HTML:



        
25条回答
  •  盖世英雄少女心
    2020-11-28 18:34

    You must put the tooltip javascript after the html. like this :

     I am Here
    
     
    

    Or use $(document).ready :

    $(document).ready(function() {
    
    $("* [rel='tooltip']").tooltip({
       html: true, 
       placement: 'bottom'
    });
    
    });
    
    
    

    The tooltip not working because you put the tooltip html before the javascript, so they don't know if there is a javascript for the tooltip. In my opinion, the script is read from the top to the bottom.

提交回复
热议问题