Advertisement
nubilfi

append data

Jan 12th, 2017
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script src="/socket.io/socket.io.js" type="text/javascript"></script>
  2. <script>
  3.     var socket = io();
  4.         socket.on('items', function (data) {
  5.             $.each(data, function() {
  6.                 $('#listItem').html($('<li class="list-group-item" id="listGroup">')+this);
  7.             });
  8.         });
  9. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement