I have 7 different buttons that all perform the same javascript function on click. should i use class selector or id selector.
$(\"input.printing\").on(\"c
as we all know id selector is faster and better .. but in you case.. since you are selecting each id 8 times.. which compare to the class seletor is slower as you can see here
class selector in your case is better, faster, and more readable...
note: what if you have to add 20 more buttons in the near future (100 would be too much).....and you choose to go with id selector... phewwww!!! that is like, 20 more event handler...... ;) ;)