hint
Awesome tooltips at your fingertips
Install
Using Bower
bower install -S hint
Using npm
npm install -S hint
Usage
Just give your elements a nice tooltip in HTML. When hovered, the hint will appear.
<span data-hint='foobar'>Foo Bar</span>
You'll get a nice little tooltip. Remember to include the CSS in your styles!
By default, the :after
pseudo-selector is used. This means you can use the :before
pseudo-selector for your own purposes. If you need to switch things up, use the data-hint-before
attribute instead.
<span data-hint-before='foobar'>Foo Bar</span>
You can also use the aria-label
attribute.
<span aria-label='foobar'>Foo Bar</span>
If you want the aria-label
hint to use :before
, then you must use the hint-before
class on the element as well.
Hints have a z-index
of 5000
.
License
MIT