Answer the question
In order to leave comments, you need to log in
How to set up a scroll wheel when loading data via ajax?
There is a block container for chat:
<div id="message_block"></div>
#message_block{
display: flex;
flex-direction: column;
justify-content: flex-end;
overflow-y:scroll;
}
function (result)
{
if(result){
var html_data='<p>';
$.each(result,function(index,value){
html_data+=value.message+'</p><p>';
});
html_data+='</p>';
$('#message_block').html(html_data).css('overflow-y','scroll');
}
overflow-y:scroll
for the main block, the message scroll wheel does not appear. There is a strip, but there is no wheel in it. And older messages are not visible or scrollable. How to fix?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question