I don't know if I should use onclick in HTML/PHP or a single click function bound to a specific id.
onclick example:
<button onclick="performAction()">Click me!</button>
function performAction() {
....
}
click example in jQuerys document ready function:
<button id="abc">Click me!</button>
jQuery(document).ready(function ($) {
$("#abc").click(function () {
...
});
});
What are the pro/cons and which one is better/faster to use? Thanks for your opinion!