JSFiddle - React, Tailwind, and code Playground
HTML
<div id="result">test content</div>
<!-- пример из сайта know-online.com -->
JavaScript
$.widget("ui.customWidget", {
options: {
name: "World"
},
showMessage: function() {
this.element.html("Hello " + this.options.name);
}
});
var res = $("#result").customWidget();
res.customWidget("showMessage");