I'd like to wrap this bit of code in a function:
I'd like then to be able to use the ready as follow:
Obviously, this is not working. I've been searching for functions wrapper for addEventListener but didn't come up with anythings satisfying. What would be the correct approach/syntax to wrap an eventListener in a function, and then use that function instead of the event listener?
Thanks in advance.