Scroll messages

26 views
Skip to first unread message

Maurice Waka

unread,
Oct 1, 2017, 8:33:41 AM10/1/17
to web2py-users
Am using this code from web2sockets:

 <script>
   $(document).ready(function(){
      var data;
      $.web2py.web2py_websocket('ws://127.0.0.1:8000/realtime/mygroup', function(e){data=eval('('+e.data+')')});
   });
   </script>

My chat messages appear/come in well but I would like to that when the latest message comes in, usually at the bottom of the page, the function automatically scrolls to that bottom message for me to view.
How do I code that.
Reply all
Reply to author
Forward
0 new messages