Share Posted March 17 Hello! I have a timeline. I want tl.play() to work on a computer and not work on a phone. The click listener is added like this: element.addEventListener("click", handler) The click listener is removed like this: element.removeEventListener("click", handler) if you add a listener like this: element.addEventListener("click", ()=>handler()) then this listener can't be removed (I couldn't) My problem is that tl.play is only added like this: element.addEventListener("click", ()=>tl.play()) This means I can't remove it. Help me please. See the Pen GRXGbwM?editors=1011 by romanusname (@romanusname) on CodePen 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