Last active
August 11, 2017 07:09
-
-
Save henocdz/a72f7d25c2f83ea38268 to your computer and use it in GitHub Desktop.
Tooltipster dynamic color on hover
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $('.tooltip').tooltipster({ | |
| functionBefore: function(origin, continueTooltip){ | |
| continueTooltip(); | |
| var color = origin.data('color'); | |
| if(!color){ return false; } | |
| $('.tooltipster-default').css({ | |
| 'background-color': color | |
| }); | |
| $('.tooltipster-arrow span').css('border-color', color); | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment