Advertisement
nubilfi

DOM html list

Jan 19th, 2017
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var html = '';
  2. for (var i = 0; i < data.length; i++) {
  3.     html += '<li class="list-group-item" id="listGroup">'+data[i].item_name+'<span class="badge">'+data[i].stock+'</span></li>';
  4. }
  5. $('#listItem').html(html);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement