• We just launched and are currently in beta. Join us as we build and grow the community.

Twitter Bootstrap Tooltip

BL1TZ

Giggle Programmer
B Rep
0
0
0
Rep
0
B Vouches
0
0
0
Vouches
0
Posts
45
Likes
70
Bits
2 MONTHS
2 2 MONTHS OF SERVICE
LEVEL 1 300 XP
Learn how to create twitter-like tooltip using Bootstrap. A tooltip that doesn't rely on images and using CSS3 for animation.

This script is very helpful if you want to display more info about the anchor link or the like.

If you have question about this code, email me at [email protected] or visit twitter bootstrap site. Thank you.

Sample code:

  1. <?php include('header.php'); ?>
  2. <body>
  3. <div class="row-fluid">
  4. <div class="span12">
  5. <div class="container"> <br>
  6. <br>
  7. <

    script type=

    "text/javascript"

    >
  8. $(

    document)

    .ready

    (

    function

    (

    )

    {

  9. $(

    '#first'

    )

    .tooltip

    (

    'show'

    )
  10. $(

    '#first'

    )

    .tooltip

    (

    'hide'

    )
  11. }

    )

    ;
  12. </

    script>
  13. <

    script type=

    "text/javascript"

    >
  14. $(

    document)

    .ready

    (

    function

    (

    )

    {

  15. $(

    '#second'

    )

    .tooltip

    (

    'show'

    )
  16. $(

    '#second'

    )

    .tooltip

    (

    'hide'

    )
  17. }

    )

    ;
  18. </

    script>
  19. <

    script type=

    "text/javascript"

    >
  20. $(

    document)

    .ready

    (

    function

    (

    )

    {

  21. $(

    '#third'

    )

    .tooltip

    (

    'show'

    )
  22. $(

    '#third'

    )

    .tooltip

    (

    'hide'

    )
  23. }

    )

    ;
  24. </

    script>
  25. <

    script type=

    "text/javascript"

    >
  26. $(

    document)

    .ready

    (

    function

    (

    )

    {

  27. $(

    '#fourth'

    )

    .tooltip

    (

    'show'

    )
  28. $(

    '#fourth'

    )

    .tooltip

    (

    'hide'

    )
  29. }

    )

    ;
  30. </

    script>
  31. Tooltip direction is a the left <a href="#" data-placement="top" id="first" data-toggle="tooltip" title="first tooltip">Top</a> <br>
  32. <br>
  33. Tooltip direction is a the left <a href="#" data-placement="left" id="second" data-toggle="tooltip" title="second tooltip">Left</a> <br>
  34. <br>
  35. Tooltip direction is a the right <a href="#" data-placement="left" id="third" data-toggle="tooltip" title="Third tooltip">right</a> <br>
  36. <br>
  37. Tooltip direction is a the right <a href="#" data-placement="bottom" id="fourth" data-toggle="tooltip" title="fourth tooltip">bottom</a> </div>
  38. </body>
  39. </html>

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.

Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:

1. Re-scan downloaded files using your personal virus checker before using it.

2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.


Download
You must upgrade your account or reply in the thread to view hidden text.
 

442,401

317,942

317,951

Top