cycle/tween colors while element is tapped
I am trying to tween / cycle the color of the background of a page while
it is clicked. When the click is lifted, the cycling stops and the
background color remains at the last cycled value. When it is clicked
again, the process will continue.
Check the example here to see what I am referring to when I say cycle the
color http://www.javascript-fx.com/development/colorcycle/spancycle.html
While browsing for solutions I have come across some libraries like
JSTween or GSAP, but with my very fragile javascript experience I failed
at implementing the examples to suit my need.
Any suggestions on how to do this will be helpful, preferably without any
libraries since it will aid more in my understanding of javascript. I am
not looking for exact code, a pseudocode explanation of the process will
also be great.
Best, Andrei
No comments:
Post a Comment