I want to wrap entire content into single div, it needed for loop inside append function. after wrapping around div in javascript, it's not displaying anything.

here is my code;

```
$('#postjson').append(
  '<div>' + '<div id="' + data[0].id + '">' + '<p>' + '<div id="namediv">' + data[0].FirstName + '&nbsp;' + data[0].MiddleName + '&nbsp;' + data[0].LastName + '<br/>' + '<span id="locationspan">' + 'xyz' + data[0].Location + '</span>' + '</div>' + '<br/>'
  //+'Email:'+data[0].Email+'<br/>'
  //+'Mobile:'+data[0].Mobile+'<br/>'
  + '</p>' + '</div>'
  // displaying book details
  +
  for (var i = 1; i < data.length; i++) {
    tr = $('<tr/>');
    tr.append("<td>" + data[i].BookNo + "</td>");
    tr.append("<td>" + data[i].BookTitle + "</td>");
    tr.append("<td>" + data[i].BookGenre + "</td>");
    tr.append("<td>" + data[i].BookWriter + "</td>");
    tr.append("<td>" + data[i].BookDescription + "</td>");
    $('#displaytable').append(tr);
  } + '</div>'
);

```