Jump to content
Search Community

farzin

Members
  • Posts

    6
  • Joined

  • Last visited

Posts posted by farzin

  1. minimal example


    See the Pen yLGPpoG by okhtapus (@okhtapus) on CodePen



    now i want to add class to ".collection-thumbs li" while scrolling and "$elementSelector" is pinned
    * number of  ".collection-thumbs li" can be different as you can see in the link above
    ** i want to divide scrolling time equally between ".collection-thumbs" children

  2. hi every one

    i have a problem
    in this page 
    https://peyrovifurniture.com/product-category/collections/

    its my code

    
    	const commonScrollTriggerConfig = {
    	  start: 'top top',
    	  end: '+=200%',
    	  scrub: 1,
    	  pin: true,
    		markers: true
    	};
    
    	// Define animations for multiple elements
    	const elementSelectors = Array.from({ length: 50 }, (_, i) => `.collectionz-wrap-${i + 1}`);
    
    	elementSelectors.forEach((elementSelector) => {
    	  gsap.to(elementSelector, {
    		scrollTrigger: {
    		  trigger: elementSelector,
    		  ...commonScrollTriggerConfig,
    		},
    	  });
    	});


     now i want to add class to ".collection-thumbs li" while scrolling and "$elementSelector" is pinned
    * number of  ".collection-thumbs li" can be different as you can see in the link above
    ** i want to divide scrolling time equally between ".collection-thumbs" children

×
×
  • Create New...