Hello
Thanks for your input.
I was able to solve it. (With a “little” help from my professor.)
If anyone is interested i might post a jsfiddle.
Regards!