I have an HTML:
<div class="row" id="show"></div>
And a JQuery:
$.ajax({
type: 'POST',
url: 'query2.php',
data: key,
dataType: 'json',
success: function (msg) {
var tmp = "";
$.each(msg, function (i, v) {
tmp += ('<div class="cell">' + v.jobTitle + '</div>');
tmp += ('<div class="cell">' + v.jobName + '</div>');
tmp += ('<div class="cell">' + v.fullName + '</div>');
tmp += ('<div class="cell">' + v.phone + '</div>');
tmp += ('<div class="cell">' + v.mail + '</div>');
tmp += ('<div class="cell">' + v.city + '</div>');
tmp += ('<div class="cell">' + v.description + '</div>');
$('#show').html(tmp);
alert(tmp);
});
If i have on row in my query the result would be:
But if i have more rows, It get messy and all would show in one row:
How can i show another row with class="row" in my loop?
Thanks in Advance.