<script src="http://code.jquery.com/jquery.min.js" type="text/javascript"></script>
<ul>
<li>li</li>
<li class="now">now</li>
</ul>
<ul>
<li>li</li>
<li class="now">now</li>
</ul>
<script type="text/javascript">
$(function(){
$('li[class="now"]').each(function(i){
$(this).click(function(){
alert(i);
});
});
});
</script>