How to Create a Frozen Header That Changes as Visitors Scroll

Followed this link on youtube for tutorial but it dint work: https://www.youtube.com/watch?v=8iO0G_qWqRY
i put all the codes exactly step by step as shown in the video tutorial but it dint work.
Kindly let me know how can i make this work

A where’s problem, what are you it will do?

I’d possibly progressed otherwise, not duplicate would but discolour / transparency plus on page added some element, that would start transformation at scroll - at scrolling. Colour / transparency headings turns this way:

white color:
$w(“#header1”).style.backgroundColor = “rgba(255,255,255,1)”

transparency:
$w(“#header1”).style.backgroundColor = “rgba(255,255,255,0)”

Can you explain the steps please cause i am not sure what you mentioned in your response.