1 var lists = $('.list'); 2 for (var j = 0; j < lists.length; j++) { 3 var index = $('.list').eq(j).attr('dataIndex') 4 5 }