Tooltips

Total Post:113

Points:791
 231  View(s)
Ratings:
Rate this:

 Tooltips in Bootstrap ?



  1. Post:140

    Points:984
    Re: Tooltips

    To create a tooltip, add the data-toggle="tooltip" attribute to an element. Tooltip are quite useful for showing description of different elements in the webpage. Tooltip can be invoked on any element in a webpage. Use the title attribute to specify the text that should be displayed inside the tooltip: 

    <a href="#" data-toggle="tooltip" title="Hooray!">Hover over me</a>
    

    Syntax:

    <script>
    $(document).ready(function(){
        $('[data-toggle="tooltip"]').tooltip(); 
    });
    </script>
    

    Example :

    <div class="row" style="margin:60px">
        <button type="button" class="btn btn-warning"
         data-toggle="tooltip" data-placement="left"
         data-html="true"
         title="<h4>Hey!</h4><p>Go for Mindstick</p>">
              Warning
        </button>
    </div>

    Happy coding :)

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!