add active class to button onclick jquery
/*
CSS:
.active{
background-color: red;
color: #fff;
font-weight: bold;
}
*/
/* Before Execution*/
<button class="my-btn">Login</button>
$(".my-btn").click(function() {
$(this).addClass("active");
})
______________________________________________
/* After Execution*/
<button class="my-btn active">Login</button>