Share Posted April 17, 2018 8 hours ago, maxxheth said: 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. Gotcha. I wasn't sure if you wanted to target single and multiple elements, so that's why I brought up the event emitter. It's a great way to keep things decoupled. That's actually how reactive libraries like React, Vue, Angular and RxJS work, although they call it a observer/observable. A silly event emitter demo I made for another thread. 45 different input ranges are being driven by animating a simple object. See the Pen Lzxwee by osublake (@osublake) on CodePen 1 Link to comment Share on other sites More sharing options...
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!Register a new account
Already have an account? Sign in here.Sign In Now