There is no one-size-fit-all answer here. There are benefits to all approaches.
In your particular example, it seems that both modOne and modTwo do some things with a DOM element (have methods that show/hide the child nodes). Both modules are very linked to the DOM elements they work on, meaning that you can't reuse the module to work on other elements. When you think about it that way, it becomes apparent that the Elements they act on (the data the module acts on) should be provided by an outside source, so having a global variable that gets passed to each module seems better. What might be even better would be a data service module that passes the data the modules need.
Continuing on this path you can see how a simple show/hider turns into a monstruous multi-layered architecture that is too complex to tackle without a thorough understanding of the whole system.
With that in mind, the answer is that you should go for whatever makes your code clearer. Complex applications call for complex solutions, simple applications should get simple solutions.