JSFiddle - React, Tailwind, and code Playground
HTML
<div id=mydiv></div>
JavaScript
function test(obj, func){
$(obj).hide('slow', func);
}
test('#mydiv',function(){ alert('called by anonymous');});
<div id=mydiv></div>
function test(obj, func){
$(obj).hide('slow', func);
}
test('#mydiv',function(){ alert('called by anonymous');});