JSFiddle - React, Tailwind, and code Playground
by lollero
HTML
<button>Button</button>
<div>Div</div>
JavaScript
$.fn.hideMe = function( speed) {
return $(this).hide( speed || 0 );
};
$('button').click(function () {
$('div').animate({ opacity: 0.25 }, 900, 'swing', $(this).hideMe );
});