$(xml).find('item').each(function () { var item = $(this).attr("name"); $("#grid_list").append('<div class="ui-block-a"><div class="ui-bar ui-bar-c" style="margin: 5px;"><a href="#">"' + item + '"</a></div></div><div class="ui-block-b"><div class="ui-bar ui-bar-c" style="margin: 5px;"><a href="#"></a></div></div>'); $("#grid_list").grid('refresh'); });Desired output: It has to display the items as side by side like "item1" in 1st row 1st column and "item2" in 1st row 2nd column and so on.And the block should be in square shape in the middle of the screen.
Thanks in Advance.