JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/themes/ui-lightness/jquery-ui.css">
<div class='another one'>one</div>
<div class='two another'>two</div>
<div class='three'>three</div>
JavaScript
var classes = ['one','two','three'];
$.each(classes, function(i, c) {
$('.' + c).click(function(){
alert(c);
});
});