Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

S

Sophia2711

@Sophia2711
About
Posts
2
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Change Text while scrolling
    S Sophia2711

    I have different videos among each other and would like to show the caption at a certain scrollposition. Is that possible? How can I implent that?
    I already have kind of a code snipet

    const bodyTag = document.querySelector("body")
    const sections = document.querySelectorAll("section")
    const clientTag = document.querySelector("div.client")
    const headerTag = document.querySelector("header")
    
    
    document.addEventListener("scroll", function () {
      const pixels = window.pageYOffset
      
      sections.forEach(section => {
        if (section.offsetTop - 60 <= pixels) {
          const title = document.querySelector("div.title")
    //       clientTag.innerHTML = section.getAttribute("data-client")
          clientTag.innerHTML = section.getAttribute("data-client")
        }
      })
    })
    
    
    General Discussion
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Recent
  • Tags
  • Popular
  • Users
  • Search