Can this be forked?

Name: AAPL

Price: $147.42

Name: AAPL

Price: $147.42

Plain
Text
Syntax
Highlighting
const wrapper = document.querySelector( '.wrapper' );
const content = document.querySelector( '.content' );

content.addEventListener( 'scroll', event => {
  let scrollRange = content.scrollHeight - content.clientHeight;
  let scrollProgress = content.scrollTop / scrollRange;
  wrapper.style.setProperty( '--scroll-progress', scrollProgress );
} );
const wrapper = document.querySelector( '.wrapper' );
const content = document.querySelector( '.content' );

content.addEventListener( 'scroll', event => {
  let scrollRange = content.scrollHeight - content.clientHeight;
  let scrollProgress = content.scrollTop / scrollRange;
  wrapper.style.setProperty( '--scroll-progress', scrollProgress );
} );
const wrapper = document.querySelector( '.wrapper' );
const content = document.querySelector( '.content' );

content.addEventListener( 'scroll', event => {
  let scrollRange = content.scrollHeight - content.clientHeight;
  let scrollProgress = content.scrollTop / scrollRange;
  wrapper.style.setProperty( '--scroll-progress', scrollProgress );
} );

Can this be forked?

By Hakim El Hattab

Can this be forked?

  • 1,210