I'm using this code snippet.
The function only works when I run it with body onload.
If I declare an own function inside there I'm able to run it like this:
But the drawGradient(); function or createGradientV(); function etc only runs from body onload... Why is that? / How can I make it run like the example above?
Please try the code snippet from the link above.