$(document).ready(function(){
var i = 0;
var LastId = $('.PItem').last().attr('data-id');
var ResultBlock = $('#result');
for ( i=0; i <= LastId; i++ ) {
var ThisItem = $(".PItem[data-id='" +i+ "']").attr("data-description");
$(ResultBlock).append(ThisItem);
};
}); |