Jump to content
Search Community

ShopAnHour

Members
  • Posts

    2
  • Joined

  • Last visited

ShopAnHour's Achievements

0

Reputation

  1. Hello Rodrigo , i already know you from here thanks for your fast answer, i got to admit that i don't even know what i wanted to solved in the first time, because everything is so blurry to me speaking code. So i'll focus on one element: ".nav-cd-trigger" is linked to $('.cd-nav-trigger').click(function(){ TweenMax.set(".stag", {clearProps:"all"}) TweenMax.staggerFrom('.stag', 2, {alpha:0, yPercent:-100, scale:0.4, force3D:false, ease:Elastic.easeOut},0.2); }) When i first brainstormed my menu animation from scratch from infos gathered in the documentation i tried to use the reverse method, storing the "from" tween as a function "toggleMenu" (ill keep it simple for example) (mytween > stagFrom > opacity 0 (to default opacity)), then i made a statement if "menu-is-open" (class added to the body by the menu snippet), then when i click again on "cd-nav-trigger' the menu animation would reverse animation via "toggleMenu.reverse()". So: Click menu trigger > mytween From Reclick menu trigger > mytween To But i never managed to make it work so i just copy pasted a code from your demo... Also i discovered something very problematic by the way, when a link is affected with a class linked to a tween (.stag in my example), well it wont load the page linked...
  2. Hello and thanks and congratulation for this amazing tool. Newbies here, i only know few basics about javascript/jquery but managed -thanks to the extensive documentation and active community- to do what i wanted to do: animate a menu. However i surely haven't done it the cleanest way possible that's for sure, because i collected informations from topics to topics and melted all possible junk of codes in an experimental mix of javascript/jquery.(Soon MIT Licensed). Here is a codepen, there is missing css style so its not particulary pleasant to watch but this is working: http://codepen.io/Rofizzle/pen/myGyJM So, I ended up using a snippet from a greensock demo, because that was exactly what i wanted, however i have never managed to make the reverse method to work, and use another tween to make stuff go in or out, with statements. Is there any way to clean that code with solid reverse method?
×
×
  • Create New...