maxxheth

Members
  • Content count

    7
  • Joined

  • Last visited

Community Reputation

5 Newbie

About maxxheth

  • Rank
    Newbie
  • Birthday 02/16/1985

Contact Methods

Recent Profile Visitors

141 profile views
  1. maxxheth

    How to toggle tweens in a DRY fashion

    Cool...I'll have to play around with that sometime. =) Yeah, I haven't really dug into any of the frameworks (though I do use NPM and Browserify as part of my core tooling, so I'm not completely out of the loop as far as modern JS goes...lol), but React and Vue seem interesting. On another note, I have sort of a personal question: do you use the class function in your projects a lot and do you feel it offers advantages over using constructor functions or factory functions as far as your work goes? There seems to be a lot of upheaval about the introduction of classes into ES6 and something I've been researching on and off ever since I took a deep dive into JavaScript last summer. For context, I knew some JS and jQuery then (though not that much), but I ended up having to ramp up my JS skills very quickly for a web design project that required some substantial customization on the frontend and backend, so I kickstarted my ES6 journey with a trial by fire, so to speak. Anymore, it seems that best practices in JS are a constantly moving target.
  2. maxxheth

    How to toggle tweens in a DRY fashion

    Yeah, fair enough! I guess I just wanted to be able to switch back and forth between being able to target single elements and multiple elements on a whim, but your event emitter / data attribute solution works perfectly for that as well.
  3. maxxheth

    How to toggle tweens in a DRY fashion

    Thanks Blake! That's pretty handy! I like how you used the event emitter plugin and data attributes to toggle the tween for the whole set. Yeah, not looping when you don't have to is def ideal.
  4. maxxheth

    How to toggle tweens in a DRY fashion

    Actually, I managed to figure it out. I tried working it out in the code itself, but the easiest way is to just to target each element through its own class or ID and and run it through each function individually. Since each element will reside in its own array, the reverse / toggle logic will only apply to the element inside that array. Maybe there's a better way (I'm always open to suggestions!), but this will work for my purposes. =)
  5. maxxheth

    How to toggle tweens in a DRY fashion

    @OSUblake Is there a way to toggle items individually without reversing other elements that have already been triggered?
  6. maxxheth

    How to toggle tweens in a DRY fashion

    Thanks @OSUblake! Nice ES6 implementation.
  7. maxxheth

    How to toggle tweens in a DRY fashion

    Hey everyone! So I realize this thread is really old, but I was messing around with Blake's implementation of the jQuery / TweenLite animation toggle last night and ended up rewriting it in vanilla JS in case anyone's interested in using that instead of jQuery for whatever reason: