JSFiddle - React, Tailwind, and code Playground
HTML
<p>test1</p>
<p>test2</p>
<p>test3</p>
JavaScript
(function ($, undefined) {
$.fn.abc = function () {
return this.each(function () {
$('body').append($('<p>').text("Inside loop: " + $(this).text()));
});
};
}(jQuery));
$('p').abc().css('color', 'red');