Reputation: 21
I want to use some classes in tippyjs to change the codes when those classes are called but I don't know how to use them
new Tippy('.tooltip.fade.bottom.in {}', {
position: 'top',
animation: 'scale',
arrow: 'true',
});
Upvotes: 2
Views: 2741
Reputation: 2077
Welcome to SO!
As stated in the Tippy JS documentation:
tippy($('#someElementId'))
substitute #someElementId with your HTML elementtippy('button');
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://unpkg.com/popper.js@1"></script>
<script src="https://unpkg.com/tippy.js@5"></script>
<link rel="stylesheet" href="https://unpkg.com/tippy.js@5/dist/backdrop.css" />
<button data-tippy-content="Tooltip">Text</button>
Upvotes: 1