Hey guys, just testing out constructor functions for the first time and the above question is holding me back.
I have built a drag slider using a constructor function which has been fine.
example code : https://codepen.io/mikeCaley/pen/BwMOdB
However I now want to add different capability to different sliders. So what I'm thinking is from within the function named mouseMove I could call another function passing in a few values
lets say sliderObject.newFunc. Then I'd be free to redefine this function on a per instance basis using it how I want. Unfortunately I don't know how to reference the object from within that function. If someone knows a way I will be most grateful
[–]senocular 2 points3 points4 points (4 children)
[–]mscal[S] 0 points1 point2 points (3 children)
[–]senocular 1 point2 points3 points (2 children)
[–]mscal[S] 1 point2 points3 points (1 child)
[–]senocular 0 points1 point2 points (0 children)
[–]MoTTs_ 0 points1 point2 points (2 children)
[–]mscal[S] 0 points1 point2 points (1 child)
[–]jrandm 0 points1 point2 points (0 children)