I have been trying to work out how to get my offset to update when my window gets resized as I have fluid typography working and when the H1 resizes the offset pin it still in the original position.
My knowledge in JS is not huge as I am only in beginner stage. I know how to do basic functions with resize but haven't been able to get it to work with my offset variable.
you can notice I have the H1 title pin in the middle of the screen when you scroll down, but if the user resizes the window the offset is not longer 50% position of the title.
Hi there,
I have been trying to work out how to get my offset to update when my window gets resized as I have fluid typography working and when the H1 resizes the offset pin it still in the original position.
My knowledge in JS is not huge as I am only in beginner stage. I know how to do basic functions with resize but haven't been able to get it to work with my offset variable.
If you checkout my codepen here: https://tinyurl.com/yanbxrnd
you can notice I have the H1 title pin in the middle of the screen when you scroll down, but if the user resizes the window the offset is not longer 50% position of the title.
Many thanks :)