I have this https://codepen.io/anon/pen/RgQOWz
It has increment/decrement and it does what I want, but the problem is they both change together and I want to separate counter 1 from counter 2 meaning if I want to change counter 1 values it doesn't have to effect counter 2 and vice versa.
I can basically give counter 2 different class names and write another script for it but that is a lot of work considering the counters will be many.
so how do I do this?
Javascript code
$(".increment").click(function() {
  var score1 = $(".score").val();
  score1++;
  $(".score").val(score1);
});
$(".decrement").click(function() {
  var score1 = $(".score").val();
  if (score1 == 0) {
  } else {
    score1--;
    $(".score").val(score1);
  }
});
 
     
     
    