Is there a more efficient way ... this ? attr ?
I am making a calculator, just to test myself / learn more. I have all of the number buttons in the same class, and right now I have 10 functions ( one for each number button ). This is my idea, I have tried a bunch of different ideas, but I can't get it to work.
$('.button').click(function() {
var screenValue = this.text;
$('screenText').text(screenValue);
});