I would like your opinion on the following matter... I have a web application with some kind of panel with many buttons on it. Every button once clicked should have a separate function. I can see two implementations for this. First just enable a click watch event on every button separately, Second enable only one click watch event on parent element (panel) of buttons and then use a switch statement to find the button clicked and execute the appropriate function.
Which way is performance wise, better and lighter? having multiple watchers running simultaneously (first way), or only one watcher that runs a conditional statement every time? (second way).. Thanks!