JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://vadikom.com/demos/poshytip/src/jquery.poshytip.js"></script>
<link rel="stylesheet" href="http://vadikom.com/demos/poshytip/src/tip-yellow/tip-yellow.css">
<span id="tip">Click me</span>
CSS
.extraClass {
text-decoration: underline;
color:blue;
}
JavaScript
$('#tip').live('click', function(e) {
$('#tip').poshytip({
// className: 'tip-yellow',
// Replacing the previous line with the next one breaks the layout:
// className: 'tip-yellow extraClass',
// This option doesn't exist:
// id: 'myId',
content: 'I want to be myId with underlined text :-(',
showOn: 'none',
alignTo: 'target',
alignX: 'right',
alignY: 'center',
offsetX: 10,
offsetY: 5
}).poshytip('show');
$('.tip-yellow:last').addClass('extraClass').attr('id', 'myId');
});
// Can we add extraClass and set myId after initialization?