0

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:

enter image description here

But if i have more rows, It get messy and all would show in one row:

enter image description here

How can i show another row with class="row" in my loop?

Thanks in Advance.

meph
  • 209
  • 1
  • 5
  • 16
  • By using the solution given in your [other question](http://stackoverflow.com/questions/33581177/showing-array-with-jquery) to the same problem... – Andreas Nov 07 '15 at 17:54
  • And it didn't resolved and i updated it and no one replied!!! So i asked it again in order to place the answer there too. Thanks by the way. – meph Nov 07 '15 at 19:22
  • I still don't understand what needs to be accomplished. – dchayka Nov 18 '15 at 00:33

0 Answers0