JSFiddle - React, Tailwind, and code Playground
by senica
HTML
<button>My Button</button>
JavaScript
var myplugin = function(options){
if(options.onclose){
options.onclose.call(this);
}
}
myplugin({
onclose:function(){
alert("You rule");
}
});
/*var test2 = function(myfunc){
myfunc.call({}, "me", "cool");
}
test2(function(arg1, arg2){
console.log(this, arg1, arg2);
});
$("button").on("click", function(){
alert("button click");
});*/