The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Thanks very much for the reply.
I’ve added a working codepen:
How would i use the module pattern above using the jquery document ready in my example? and would I need to pass all my vars into the module too?