You need to append that
ul
to another
div
or something then append all the
li
to that
ul
like below...
else
{
var list = $("#result").append('<ul></ul>').find('ul');
list.append('<li>' + data.results.retailername + '</li>');
list.append('<li>' + data.results.productname + '</li>');
list.append('<li>' + data.results.price + '</li>');
list.append('<li>' + data.results.distance + '</li>');
}