Rotate element on scroll - horizontal website

I'm trying to rotate an img on scroll, but the thing is that i constructed my website to be horizontal by rotating a master wrapper -90 deg, so the "scrolling" of the website is actually contained within this div. This means that the command "document.addEventListener("scroll"..." will not work - i will need to target the scroll of the div (with class="elementor") in which all content of my website is contained and make the logo rotate according to the scrolling of this. So something like "document.getElementsByClassName("elementor")[0].addEventListener("scroll"...".

I tried my best but it does not work (see bottom of JS). Any help is appreciated.

My website is


/*My img*/
<img class="logojakob" id="jakoblogo" src=""/>

/*There's a (scrollable) main wrapper containing all my website content with class="elementor"*/


.logojakob {
  position: fixed;

/* Horizontal website */
  .elementor {
  width: 100vh;
  height: 100vw;
  overflow-x: scroll;
  overflow-y: scroll;
  transform: rotate(-90deg) translateX(-100vh);
  transform-origin: top left;
  -ms-overflow-style: none;
/* This is just "de-rotating" the undersection */
.elementor-section-wrap {
  transform: rotate(90deg) translateY(-100vh);
  transform-origin: top left; 
  flex-direction: row; 
  width: 200vw;

JS (I included my JS of diverting my vertical scroll to horizontal scroll within the div container of "elementor" for reference - which works.)

/*Divert Horizontal scroll to vertical (WORKING)*/

<script type="text/javascript">
function transformScroll(event) {
  if (!event.deltaX) {

  event.currentTarget.scrollTop += event.deltaY + event.deltaX;

    var element = document.getElementsByClassName("elementor")[0] || document.getElementsByClassName("elementor")[0];
element.addEventListener('wheel', transformScroll);

/* Rotate img on scroll (NOT WORKING) */

<script type="text/javascript"> 
var leftgear = document.getElementById("jakoblogo");
    element.addEventListener("scroll", function() { = "rotate("+element.pageYOffset+"deg)";
How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum