Jump to content
Search Community

Jo Mourad

Premium
  • Posts

    17
  • Joined

  • Last visited

About Jo Mourad

Recent Profile Visitors

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

  1. @Cassie A-w-e-s-o-m-e. That simple lol. And can we put in a default value if none is defined? Watched a bit of the video, and i didn't even know that existed. Will definitely look into this ! Thanks!
  2. I've searched around, but can't find what i need. Maybe because i don't know what terms to search for... (LEARNING CODING AS I GO...) Basically, i have an animation that i want to call in several pages. But i want, let's say, to change the duration of that animation for some instances. Or maybe the "x" translation. So i created a function for my animation function fuzionAnim() { gsap.to(".fuzion", 10, {x:100, yoyo:true, repeat:-1, ease:"none"}) } and call it in the specified pages fuzionAnim(); But can i pass a parameter to the function? For example fuzionAnim(8); // 8 being the duration i want How would i do that? i know it's probably plain javascript fundamentals, but i need a bit of help! Thanks!
  3. Ok! so this means that the css variable on the pseudo element can be called directly from the element itself without using ::before ?
  4. Hey @Dipscom ! I think it's only because i'm used to do it like so? I use wordpress mainly (for customer reasons) and say i have 10 dates in 10 different rows (the html gets very messy with wordpress's visual composer...) and i want to add a bullet point after each of these dates, i found it simpler and quicker to just add it with a pseudo... Any suggestions of a better way? (the way visual composer is made is that you can't really play in the html itself unless you add html code blocks... and i'm using this so that any customer can change freely the content without any help) Thanks!
  5. Hello! I was wondering what does this mean : I mean, here i have lets say this: .div { &::after { content: ""; width: 10px; height: 10px; border-radius:50%; background: blue; position: absolute; right: -2em; top: 20%; } } and i want to animate this pseudo-element. How would a css variable achieve this? Sorry i'm a bit confused. Pretty sure i'm missing something! Thanks !
  6. @OSUblake Oops! You're right! I just fixed that!
  7. Hey guys, i've been wondering why this happens... And only in a smaller resolution (i was able to reproduce with: 1070 x 635 px - have to refresh when scroll is PAST the trigger) Here is the url: https://idylliq.ca/services/ My pinned element jumps to the left when i scroll. Any idea why? Here is my code: servicesTl = gsap.timeline({ scrollTrigger: { trigger:".section-services", markers:true, start:"10% 50%", end:"bottom 70%", pin:".left-quote", onComplete: () => ScrollTrigger.refresh(), anticipatePin: 1 } }) } servicesTl.from(".left-quote span", 1, {opacity:0, ease: Power3.easeInOut}) .to(".left-quote span", 0.5, {backgroundSize:"100% 100%", ease: Power3.easeInOut},"=-0.5") .to(".left-quote span", 0.5, {color:"#fff", ease: Power3.easeInOut}, "=-0.4") edit: seems that my .left-quote starts with left:0; and then jumps to something like left: 167.875px; (depending on the size of the window i guess) i know this is probably very broad, but thanks anyways!! video.mp4
  8. PointC thanks for the quick replys. Ok so that's what i thought as well! i tried it, and well this code is online right now... i don't know if you see the two sections on the url i sent earlier, but what happens is that ony of the draggers you use works just fine. Then, when you scroll to the next one, it looks as the clipPath is updating on both, and right when you move the .... I JUST GOT IT. haha.. the problem was gsap.set(".logo-old", { clipPath: `inset(0px 0px 0px ${x}px)` }); has to be let clipper = section.querySelector(".logo-old") gsap.set(clipper, { clipPath: `inset(0px 0px 0px ${x}px)` }); !!! Thanks for all the help!
  9. PointC Sounds logic. However, being a bit new at all this, i'm confused for the set() part you're referring to. gsap.utils.toArray('.section-avant-apres').forEach((section, i) => { let myTarget = section.querySelector(".dragger"); Draggable.create(myTarget, { type:"x", bounds:".logo-new", onDrag: function() { let x = gsap.getProperty(this.target, "x") gsap.set(".logo-old", {clipPath: `inset(0px 0px 0px ${x}px)`}) } }) }); This probably makes NO sense LOL... but again, i'm new to this..
  10. Hello, i was able to create a draggable before after logo reveal! However, i need to add a second one on the same page. When i do that, they both work but one updates the other, sort of.. You can see the working example here: https://idylliq.ca/portfolio/faucon/ And here is my code: gsap.utils.toArray('.section-avant-apres').forEach((section, i) => { if (window.matchMedia("(max-width: 689px)").matches) { gsap.set(".dragger", {x:"50"}) } else { gsap.set(".dragger", {x:"450"}) } Draggable.create(".dragger", { type:"x", bounds:".logo-new", onDrag: function() { let x = gsap.getProperty(this.target, "x") gsap.set(".logo-old", {clipPath: `inset(0px 0px 0px ${x}px)`}) } }) }); i'm hoping just by looking at the javascript, you'll know whats wrong... Thanks!
  11. Hey @GreenSock! Of course! I think my question was not formulated the way i wanted... It was less of a hide-it-i-don't-want-it-stolen, and more of a "how do other sites do it it's all tidy and clean!" I sure understand the whole honor system and find it awesome! (helped me a lot) For a while now, i've been trying to figure out my whole "process" when it comes to wordpress sites, meaning minifying, cleaning, optimizing, automatizing several recurrent tasks, as i build many many wordpress sites. But in the everyday work, i never take enough time to "structure" my workflow. @Cassie thanks for that! It's basically a minifier right? @JIZA i'll take a look, see? i didn't even know stuff like that existed lol! Anyways guys, i can definitely say ever since i've started using GSAP, my work exponentially improved. It basically changed my life (workwise :P) And if anyone wants to share their workflow with wordpress + gsap + etc, let me know we could chat maybe elsewhere since this isn't a wordpress forum! Thanks for the awesome stuff!!
  12. Hey kodralex, Did you try using transformOrigin ? var rotate = gsap .timeline({ scrollTrigger: { trigger: '.wrapper', scrub: 0.2, start: '-50px', end: '0px', markers: true, }, }) .to('.square', { rotation: 199, transformOrigin: "100% 100%", duration: 2, ease: 'none', });
  13. Hello all! I usually build wordpress sites and properly enqueue gsap and my custom script js files. Since i am a greensock member, i have some gsap files i don't want to be copyable from my site. However, when i inspect page, and go to network or source, i can easily find my files. There must be a way i don't know of to hide those? Thanks!
  14. Ok thanks! I will definitely look at your article and learn JavaScript LOL I just need time to get started!!
×
×
  • Create New...