$('.item').on('mouseover', '.dot', function({ delegateTarget: t }) {
$('.thumb-target', t).attr('src', this.dataset.img);
$('.dot', t).removeClass('select').filter(this).addClass('select');
});
или
document.querySelectorAll('.item').forEach(n => {
n.addEventListener('mouseover', onMouseOver);
});
function onMouseOver({ target: t, currentTarget: ct }) {
const dot = t.closest('.dot');
if (dot) {
ct.querySelector('.thumb-target').src = dot.dataset.img;
ct.querySelectorAll('.dot').forEach(n => {
n.classList.toggle('select', n === dot);
});
}
}