jQuery set the click event the right way
Everybody should know multiple ways how to set click events in JavaScript and jQuery. But if there are multiple different ways which one is the right one? First of all what ways do we have? There are the declaratively ways: 1 2 3 4 5 <!-- declaratively example one --> <a href= "javascript:myFunction()" > click me </a> <!-- declaratively example two --> <button onclick= "myFunction()" > Click me </button>