JSFiddle - React, Tailwind, and code Playground

by slashingweapon

HTML

<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/jquery-ui.min.js"></script>
<p>This is some <span id="tippy" title="">awesomeness</span>.</p>

CSS

#tippy { color: red; }

JavaScript

$('#tippy').tooltip({
    content: '... waiting on ajax ...',
    open: function(evt, ui) {
        var elem = $(this);
        $.ajax('/echo/html').always(function() {
            elem.tooltip('option', 'content', 'Ajax call complete');
         });
    }
});