use getComputedStyle instead of transitionend
screenshot