const i = 1 const fnc = _ => { $(`.pict${i}, .buy${i}`).hide(), $(`.otmena${i}, .bought${i}`).fadeIn(300); } $(`.buy${i}`).click(fnc), $(`.pict${i}`).dblclick(fnc)