JSFiddle - React, Tailwind, and code Playground

HTML

<button>a</button>
<button>b</button>

JavaScript

(function($) {

  $.fn.content = function() {
    return this.each(function() {
      $('button').click(function() {
        console.log($(this).html());
      });
    });
  };

}(jQuery));


$('button').content();