Jump to content
Search Community

Pola86

Members
  • Posts

    11
  • Joined

  • Last visited

Pola86's Achievements

  1. Thanks Jonathan, very helpful, now it's working like a charme, thanks everybody
  2. So i figured out the problem, Firefox can't render svg in display:none.. someone has a solution for this?
  3. In the console when i digit window.TweenMax it returns undefined, has this something to do with which order I call the scripts?
  4. Hey guys, does Snap.svg has some issues with Firefox? I can't make it work while on Chrome and IE I have no problems http://s.codepen.io/Polenji86/debug/vyVxwO
  5. Thx OSuBlake, it was just a stupid "return false;" missing Now it runs smoothly
  6. Sorry it was a dumb question, I managed to resolve it by just adding "return false;" inside the trigger function $("*[href^='#']").click(function() { var target = $(this).attr('href'); goTo(target); return false; });
  7. Hello everyone, I'm having a problem with my scrollTo function. I'm building an horizontal slider scrollable with buttons but there's something weird happening. Here's an example of what i'm trying to accomplish with working code: // the function function goTo() { e.preventDefault; TweenLite.to('.wrapper', 1, { scrollTo: { x: $('#slide-glasses-2').position().left }, ease: Power2.easeOut }); } // the trigger $("*[href^='#']").click(function() { goTo(); }); Point is I don't want to call the function for every button so I wrote this: // the function function goTo(target) { TweenLite.to('.wrapper', 1, { scrollTo: { x: $(target).position().left }, ease: Power2.easeOut }); } // the trigger $("*[href^='#']").click(function() { var target = $(this).attr('href'); goTo(target); }); This doesn't work, I mean the click event brings me to the exact slide but without the scrolling animation. Any suggestions? Thx everyone
  8. Yep thx everyone, keep up with the good work i'm your fan Btw if someone's interested and needs something similar this is the final result http://codepen.io/Polenji86/pen/mOjKgj.
  9. Ok it works like a charme, thanks a lot, it's like 2 days i'm looking into this.. you are my new god i'm gonna worship you
  10. OSUblake thanks, i'm digging into your code, stay tuned
  11. Hello everyone, I'm looking for a hint, as you can see in the Codepen attached I managed to drag a masked SVG circle around the container, problem is when I want to use a path as a mask I don't know how to get the coordinates (for path there's no "cx" and "cy"). Any suggestions on how I could accomplish this? This is the function that does the trick with a circle //move the mask with the drag function onThrowUpdate() { var posX = parseInt(rocketHole.getAttribute('cx')) + this.target._gsTransform.x; var posY = parseInt(rocketHole.getAttribute('cy')) + this.target._gsTransform.y; TweenMax.set(rocketMask, { attr: { cx: posX, cy: posY } }) http://codepen.io/Polenji86/pen/KNeZOE
×
×
  • Create New...