I am working with jquery and attempting to add a class to a table on the selection of that table row.
I was initially using the following code -
$(this)
Depends really. If you don't plan on removing the class, I'd stick with addClass. Naturally, toggleClass allows you to toggle classes.
addClass
toggleClass