http://stackoverflow.com/questions/10215000/each-and-prev-can-be-used-together

jquery each prev test

by ryanwfiorini

HTML

<div class="tarefa">hello</div>
<div class="tarefa">world</div>

JavaScript

$(function() {
    i = 0 ;  
    $('.tarefa').each(function(index) {
        i++;
        if($(this).css("left") == $(this).prev('.tarefa').css("left")){
            alert(i);
        }
    });
});