changed the DOM onclick to jquery .on