You can use Regular Expression or split
the class name.
$(".etape").click(function(){
var classes = $.grep(this.className.split(" "), function(v, i){
return v.indexOf('btn') === 0;
}).join();
});
http://jsfiddle.net/LQPh6/
You can use Regular Expression or split
the class name.
$(".etape").click(function(){
var classes = $.grep(this.className.split(" "), function(v, i){
return v.indexOf('btn') === 0;
}).join();
});
http://jsfiddle.net/LQPh6/