title: How do I add the sum of three bootstrap input sliders automatically?
body: <p>I have an application where I am trying to add the sum of three bootstrap sliders:</p>
  
  <pre><code>&lt;div id="evalOne" class="qrow"&gt;
      &lt;div id="q1" class="question q_space"&gt;
          &lt;p&gt;Question 1:&lt;/p&gt;
      &lt;/div&gt;
      &lt;div id="a1" class="question a_right"&gt;
          &lt;input id="question1" type="text" data-slider-min="-5" data-slider-max="20" data-slider-step="1" data-slider-value="0"/&gt;
          &lt;span class="CurrentSliderValLabel"&gt;&lt;span id="question1Val" class="questionVal"&gt;0&lt;/span&gt;&lt;/span&gt;
       &lt;/div&gt;         
  &lt;/div&gt;
  &lt;div id="evalTwo" class="qrowa"&gt;
      ...         
  &lt;/div&gt;
  &lt;div id="evalThree" class="qrow"&gt;
      ...         
  &lt;/div&gt;
  
  &lt;div id="FinalAnswer" class="qrow"&gt;
      ...                
      &lt;span class="CurrentSliderValLabel"&gt;Total:&lt;span id="myTotal" class="answerVal"&gt;0&lt;/span&gt;&lt;/span&gt;
  </code></pre>
  
  <p>...<br>
  </p>
  
  <p>Here is what I have tried:
  <strong>See Edit</strong></p>
  
  <p><strong>Edited Portion</strong></p>
  
  <p>I wanted to show the reason I was using the span as value. according to <a href="http://seiyria.com/bootstrap-slider/" rel="nofollow">example 6 in the documentation</a> span does have a value</p>
  
  <pre><code>$("#question1").slider({step:1, min:0, max:3});
      $("#question1").on('slide', function (slideEvt1) {
      $("#question1Val").text(slideEvt1.value);
  });    
  </code></pre>
  
  <p>Looking further at the documentation I wondered what would happen if I add the sum to the actual slide event</p>
  
  <pre><code>$("#question1").on('slide', function (slideEvt1) {
          $("#question1Val").text(slideEvt1.value);
          $("#myTotal").text(sum = parseInt(slideEvt1.value));
      });
  
      $("#question2").slider({ step: 1, min: 0, max: 3 });
      $("#question2").on('slide', function (slideEvt2) {
          $("#question2Val").text(slideEvt2.value);
          $("#myTotal").text(sum += parseInt(slideEvt2.value));
      });
  </code></pre>
  
  <p>This changes the span answer total but instead of counting by 3's it counts exponentially unless I remove the <code>+</code> from the <code>sum+=</code>. However if I remove the <code>+</code> the next slider will not total onto the count, instead, the count will start over.</p>