$(function () {
let timeoutId = null;
$(".sidebar").hover(
function () {
timeoutId = setTimeout(() => {
$(this).addClass("sidebar_hovered");
}, 600);
},
function () {
// change to any color that was previously used.
clearTimeout(timeoutId);
$(this).removeClass("sidebar_hovered");
}
);
});