Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

GeorgeErshov

Members
  • Posts

    49
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

GeorgeErshov's Achievements

  1. guys, can you help me? I want to change the background color when I click I use the code: gsap.utils.toArray(".section").forEach(function (elem) { var color = elem.getAttribute('data-color'); ScrollTrigger.create({ trigger: elem, start: 'top 30%', end: 'bottom 30%', markers: false, onEnter: () => gsap.to('main', { backgroundColor: color, duration: 1.4 }), onLeave: () => gsap.to('main', { backgroundColor: '#fef9ef', duration: 1.4 }), onLeaveBack: () => gsap.to('main', { backgroundColor: '#fef9ef', duration: 1.4 }), onEnterBack: () => gsap.to('main', { backgroundColor: color, duration: 1.4 }), }); }); this is to change the background color when switching to another section Now I want to use simple code: const elem = document.querySelector(".section.hero"); const switcher = document.querySelector(".switch-theme"); switcher.addEventListener('click', function() { if (elem.hasAttribute == ('data-color', "#FEF9EF") { this.setAttribute = ('data-color', "#000000"); } }); To click on the element to change the color of my section, but I get an error instead Is it possible to change the data-color dynamically somehow?
  2. hi all I'm trying to figure out how do I make the background color change seamless? I added duration: 5 to my code, but it didn't work I want to use my code to achieve a smoothness like in this example https://codepen.io/akapowl/pen/01371330dbdec800579a15bebd463bef in my example the transition works fine, but it is too abrupt, too fast
  3. I found the answer to my question, if you are interested read it The problem is due to pictures that didn't show up in time https://github.com/locomotivemtl/locomotive-scroll/issues/220 I loaded the imagesLoaded.js library and then put one line of code and almost everything works perfectly (it doesn't load literally 30 pixels of the image, but it no longer crops the site as much as it used to) <script src="https://unpkg.com/imagesloaded@4/imagesloaded.pkgd.js"></script> imagesLoaded('.root', { background: true }, function () {locoScroll.update();}); ScrollTrigger.addEventListener("refresh", () => locoScroll.update()); ScrollTrigger.refresh();
  4. Yes, I have the same problem Also, in the browser Chrome I have a site is cut off (it is impossible to scroll the entire site), but if I refresh the page, then I can scroll further, here is a clear example of the problem, can you tell me what the problem is? https://share.vidyard.com/watch/fp8b4gDvBVYqGfHuwaW8iL? strange, but in Safari the whole site scrolls to the end without refreshing the page, but as soon as you go to the site
  5. Yes, I have the same problem Also, in the browser Chrome I have a site is cut off (it is impossible to scroll the entire site), but if I refresh the page, then I can scroll further, here is a clear example of the problem, can you tell me what the problem is? https://share.vidyard.com/watch/fp8b4gDvBVYqGfHuwaW8iL? strange, but in Safari the whole site scrolls to the end without refreshing the page, but as soon as you go to the site
  6. Oh Cassie Thanks! that's exactly what I'm trying to do ❤️
  7. @Cassie Hello, Cassie) My studio where I work has a purchased membership and I can use all the plugins. I'm just experimenting from my personal account. I can't quite figure out how to get my items to be dragged and dropped into completely different locations Here's an example of their location By sorting I mean the functionality when they can be shuffled (the 1st item can become the 4th item. The 3rd can take the place of the 2nd item, and so on). But only when these elements are already inside the block where we move them
  8. Please tell me how to make when you move an element in a block ("Drop area") elements become automatically on top of each other. And to be able to sort them an example of what I want to achieve https://codepen.io/osublake/pen/waVYvz as in the example above
  9. What could be the reason in the vs code editor in live server mode I cannot see the black block s3 after the animation has worked in block s2 But in codepen everything works as it should? I need to squeeze the screen and then the animation works, tell me what is done wrong? https://codepen.io/GeorgeDesign2020/pen/NWvRPor
  10. thank you so much, Paul! Everything works perfectly.
  11. have a nice evening. I can't figure out why the console gives out the gsap target skewElem bug not found. I gave a class to my element which should perform the skew action. example effect: https://codepen.io/GreenSock/pen/eYpGLYL help please
  12. you're probably right... I changed it to color, changed not much the name of the variable and everything works. The only thing I do not understand is why gray appears. It is only visible for the first time when you open a project. Look, please, what can you say? between section one and section two
×