$('#selections .row').each(function(index, row){ var row_index = $(this).data('index'); console.log(row_index);