title: Storing a span value into a javascript variable
body: <p>I am trying to write javascript that will go through a span, grab its value, and store it in a variable that can be used to perform arithmetic. </p>
  
  <pre><code>&lt;span id ="Weekly" class="ServerData" data-tag="WeeklyCarSales"&gt;**30**&lt;/span&gt;
  &lt;span id ="Monthly" class="ServerData" data-tag="DailyCarSales"&gt;**6**&lt;/span&gt;
  </code></pre>
  
  <p>Pertaining to the above two lines, my function is given below. In this current set up I get no result. </p>
  
  <pre><code>function divide(n1, n2) {
      ans = n1 / n2;
      document.write(" " + ans + "&lt;BR&gt;");
      return ans;
  }
  var a = $('#WeeklyCarSales').ServerData;
  var b = $('#DailyCarSales').ServerData;
  divide(a, b);
  </code></pre>
  
  <p>I should be getting an answer of "5" yet get nothing. I know the actual arithmetic works if I force an integer/float value into the variables. I seem to have continuous trouble locking down the the '30' and '6', which are the span values. Any ideas on how to grab those 2 span values?                    </p>