The scope of your question is beyond the purpose of this forum.
You indicate you want to learn it but dont want a link to github. I would argue that a link to github that does the same exact thing is a way for you to learn. Reading other peoples code and seeing how they accomplished things is a great way to expand your knowledge. No one here is going to do your research for you or teach you how to code, you have to learn things yourself.
If you were to do a simple google search (
make online chat in jquery) you'd be able to find what it is you need without trying to get others to do the research for you with pages upon pages of relevant links to do what you want.
Now if you were to actually attempt building this and have questions about the code you are working on then feel free to come back and post a question with a clear explanation of your issue, relevant code samples of the problem area and I'm sure you will get more meaningful help.