Advertisement
Guest User

Untitled

a guest
Jul 25th, 2014
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $.ajax({
  2.             url: 'AJAX/storeAjax.php',
  3.             type: 'get',
  4.             data: {'min-price' : '0'},
  5.             success: function (json) {
  6.                 $("#store-holder").empty();
  7.                 window.console.log(json);
  8.                 $.each(json, function (index, product_item) {
  9.                     if (typeof product_item == 'object') {
  10.                         newhtml += '<div class="product-container"><img src="' +
  11.                             product_item.pic + '" style="width: 50px; height: 50px;"\> <h4>' + product_item.name + '</h4></a></div>';
  12.                     } else {
  13.                         return false;
  14.                     }
  15.                     $('#store-holder').append(newhtml);
  16.                 });
  17.             }
  18.         });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement