JSFiddle - React, Tailwind, and code Playground
HTML
<a href="#" id="user_button">click</a>
<div id="hello">abc</div>
CSS
.hello{
height:100px;
width:100px;
background-color:#000;
}
.active{
background-color:#C00;
}
JavaScript
jQuery.fn.make_me_red = function() {
alert($(this).attr('id'));
$(this).siblings("#hello").toggle();
}
$("#user_button").click(function(){
//$(this).siblings(".hello").make_me_red();
$(this).make_me_red();
$(this).addClass("active");
});