JSFiddle - React, Tailwind, and code Playground
HTML
<input class="etape btn-info others">
<input class="etape btn-inverse others">
<input class="etape btn-danger others">
JavaScript
$(".etape").click(function(){
var get = $.grep(this.className.split(" "), function(v, i){
return v.indexOf('btn') === 0;
}).join();
console.log(get);
});