Jump to content
Search Community

code_wild

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by code_wild

  1. Thanks for your help yet again Rodrigo! I ended up doing something very similar to solve the problem but you way seems more succinct.
  2. Is there anyway to reliably tween a div to the location of another element on the page? I have a div off screen with an Arrow image and some text that is going to server as a 'tutorial/help item' for the user of the website. When they click the help button, I want the div to come in from offscreen and point at the particular element that it has help information for. I can tween from offscreen that is not the issue, the issue is reliably tweening to the location of the other element. I have tried using jQuery's .position() and .offset() methods to locate the element, which works somewhat but when I tween to it, it lines up the top left of the offscreen div with the top left of the element and they overlap. Is there something I can do with the origin to correct this? Here is a pen of the current behavior i am achieving. http://codepen.io/anon/pen/AhnlL (click anywhere to activate the tween) One note, for demo sake, I used absolute positioning on the input element I am trying to tween to. On my site that wont be the case. Any help would be greatly appreciated.
  3. Thanks Rodrigo! I figured that the curve would be difficult to achieve. I like the look in the codepen that you posted, I will give something like that a shot and see how it turns out.
  4. Hi Everyone, I am brand new wto GSAP and fairly new to the whole web dev world. I am a software engineer but until recently I have been focused on backend and middle tier, recently though I have decided to follow my passion and go frontend/web dev (at least for the hobby projects!). Anyway, I would like to create an animation where a div would "grow" out of a button, similar to how the applications "grow" out of the Mac dock. Any ideas on how to do this? I have fiddled around with some things and can't really find the right direction. I attached a picture of the kind of thing I am looking to replicate. I don't need a full on codepen (but wouldn't compain), just a gentle nudge or shove in the right direction would be great. Thanks for the great community and I hope to contribute soon.
×
×
  • Create New...