JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<input type="button" id="button" value="Say hello">
JavaScript
function test ()
{
this.message = "hello";
this.on_change = function (){
alert(this.message);
}
this.on_change();
}
$(document).ready(function() {
var my_object = new test();
$('#button').click(my_object.on_change);
});