Jump to content
Search Community

mastergubs

Members
  • Posts

    8
  • Joined

  • Last visited

mastergubs's Achievements

  1. thank you very much,im very happy.
  2. https://codepen.io/Touffette/pen/RwOXpMq i dont understand why its dont work with the getScrollLookup.I dont know where going
  3. Thank you,really.I will try to do with this today.Good Day
  4. its my codepen now https://codepen.io/Touffette/pen/RwOXpMq
  5. hello,see my code is like the code of Carl the teacher.https://codepen.io/snorkltv/pen/dyabKKg In this code,if i want to add menu to going on the race without scrolling,what i need? My try is this and i dont know if this good direction.Than you again. HTML <div class="menu"> <ul> <li>Austria</li> <li>Hungary</li> <li>Italy</li> <li>Great Britain</li> <li>Bahrain</li> </ul> </div> JS lis.forEach((li, index) => { console.log("foreach") li.addEventListener("click", () => { console.log("clicked") gsap.to(window, {duration: 1, scrollTo:{y:".races div:nth-child(" + (index + 1) + ")"}}}); }); }); lis.forEach((li, index) => { console.log("foreach") li.addEventListener("click", () => { console.log("clicked") gsap.to(window, {duration: 1, scrollTo:{y:".races div:nth-child(" + (index + 1) + ")"}}}); }); }); lis.forEach((li, index) => { console.log("foreach") li.addEventListener("click", () => { console.log("clicked") gsap.to(window, {duration: 1, scrollTo:{y:".races div:nth-child(" + (index + 1) + ")"}}}); }); }
  6. thank you it was what i said in my last post, its good i havent errors but my code dont work.I need a solution to use ScrollToPlugin with my horizontal scroll.I dont know if i need to use ScrollToPlugin with my scrollTrigger or to do use it alone.
  7. its good my code dont work but i havent errors i wrote scr and not src.
  8. Hello, i have my scripts in the end of my html <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.5/gsap.min.js"></script> <script scr=" https://cdn.jsdelivr.net/npm/gsap@3.12.5/dist/ScrollToPlugin.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/gsap@3.12.5/dist/TextPlugin.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.5/ScrollTrigger.min.js"></script> et in file js i write in my first line gsap.registerPlugin(TextPlugin,ScrollTrigger,ScrollToPlugin) all my code works without scrolltoplugin and when i add this in my registerPlugin my website dont work.My second question if this code seems be to good to scroll in section of my horizontal scroll const lis=document.querySelectorAll("li") console.log(lis) lis.forEach((li, index) => { console.log("foreach") li.addEventListener("click", () => { console.log("clicked") gsap.to(window, {duration: 1, scrollTo:{x:".races div:nth-child(" + (index + 1) + ")", offsetX:70}}); }); }); thank you and good day
×
×
  • Create New...