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
Obviously your first code using class is much cleaner, neater and better.
ID selector are the fastest, which is true.. but at this time and age, it doesn't really matter.
So don't get bothered so much with performance(unless it is a concern) and just use the one that is clean and maintainable.
oh btw, you don't even need that anonymous function. See below,
$("input.printing").on("click", printPdf);