I have created a chat page. Problem is when I select chat text and chat refreshes, the selected text disappears. I know there are chats that keep selected text even if the page refreshes. I want to keep text selected after updating text. My page has div
element and it updates its content from chatLog.txt
file. Any hints how to make it work?
$(function worker(){
$.ajaxSetup ({
cache: false,
complete: function() {
setTimeout(worker, 3000);
}
});
$("#divBox").load("chatLog.txt");
});
Any help is appreciated, thanks :)