How to get DOM elements and change onClick functionality

On addition to looking at the developer guide, you might take a step back and describe what you are trying to do rather than your suggested solution.