title: Feed multiple integers from web page in to single javascript function
body: <p>I have a basic function to parse an API in json, and then a simple equation using the data I've parsed;</p>
  
  <pre><code>function UpdateStats(){
      $.getJSON("https://website-with-an-api.com/api/stats", function(data) {
          variable1 = parseInt(data.value);
          calc1 = parseInt(data.value2 / 100 * 86400);
  
          $("#value1 span").html((A VALUE 1 / variable1 * calc1).toFixed(0));
          $("#value2 span").html((A VALUE 2 / variable1 * calc1).toFixed(0));
          $("#value3 span").html((A VALUE 3 / variable1 * calc1).toFixed(0));
  
      });
  }
  </code></pre>
  
  <p>I then have a corresponding web page, where the results are outputted</p>
  
  <pre><code>&lt;p id='value1'&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;p id='value2'&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;p id='value3'&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
  </code></pre>
  
  <p>Simple! But here's the thing. I will have potentially 1000's of calculations to do, in a large table (my input is shown as 'A VALUE X').</p>
  
  <p>Rather than me specifying the individual calculations in my javascript file (and bloating it), how can I take a static value from my web page (let's say any value in column "H"), and then output the result for each row in a new a column or location?</p>
  
  <p>So in other words, I obviously shouldn't be editing the my javascript file with new lines, each time I want to add a new row to my table; I should just be able to add a new row to my web page, and for the script to automatically detect the element and perform the calculation/output.</p>