Parallax with mouse

I’m trying to ‘transform’ elements, img here when the mouse moves on the page. I have integrated a vanilla code to create this effect and thought I understoond it but it seems I was wrong. The element …