JSFiddle - React, Tailwind, and code Playground
HTML
<p class="test">click me get value</p>
JavaScript
(function(){
test();
$(window).resize(function(){
test();
});
}());
function test() {
var t = $(window).width()-74;
alert('one ' +t);
$(document).on('click', '.test',{t: t}, get);
}
function get(event) {
var l = event.data.t
alert('two ' +l)
}