JSFiddle - React, Tailwind, and code Playground
HTML
<a title="one title" alt="one alt" class="one">[1]</a> <br>
<a title="two title" alt="two alt" class="two">[2]</a> <br>
<a title="three title" alt="three alt" class="three">[3]</a><br>
JavaScript
var tooltipparam = [{"class":".one","source":"alt"},{"class":".two","source":"title"},{"class":".three","source":"alt"}];
for (var key in tooltipparam) {
var source = tooltipparam[key]['source'];
$(tooltipparam[key]['class']).tooltip({
content: function () { return $(this).attr(source) }
});
}