dvbshka,
пробуйте ...
let timer, show = false;
$("body").on('scroll', function() {
window.clearTimeout(timer);
if (!show) {
$("[message_sent_on]").each(function(i, el) {
let message_sent_on = el.getAttribute("message_sent_on");
el.querySelector("span").textContent = message_sent_on;
$(el).show();
})
show = true;
}
timer = window.setTimeout(function() {
$("[message_sent_on]").hide();
show = false;
}, 100)
})