JSFiddle - React, Tailwind, and code Playground
HTML
<div id="target" style="width:150px;height:150px;background:red;">
Test
</div>
<input type="button" value="test" id="btn" />
JavaScript
$.fn.myFadeIn = function(){
this.show();
this.css("opacity",0);
for(var i = 0 ; i < 100 ;++ i){
this.css("opacity", i );
}
this.html("fadeIn invoked");
}
$("#btn").click(function(){
$("#target").myFadeIn();//invoking the $.fn.myFadeIn
});