light-tooltip
Jquery extremely light tooltip, display on hover, follow mouse
How to use
- Load jQuery and tooptip.js
<head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src="tooltip.js"></script> </head>
- Add attribute data-tooltip to any element
<body> <button data-tooltip="This is a button">My button</button> </body>
Example with CSS
<html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src="tooltip.js"></script> <style> .div-tooltip {display:none; position:absolute; background-color:#000; padding:10px; color:#fff; font-size:12px Arial; } </style> </head> <body> <button data-tooltip="This is a tooltip">My button</button> </body> </html>