I have a table which has multiple rows and the first column of each row contains a button . This button in each row needs to perform some common operation based on the data in other columns of that row.
Is it advisable to assign a common "id" to all the buttons as they will be calling the same function on click, just with different parameters. OR Instead of using "id" should I be assigning a custom class to these buttons and then for all markups having the custom class , I could define the onclick behaviour?
Which approach is the better accepted practise?