onclick="" thing is not awesome, try to use EventListeners instead, it is easy, you don't need jQuery for it and what is most important is more up-do-date approach