How to add the values of two jquery slider UI then display it? -


<script type="text/javascript">  $(function(){       $("#sliderone").slider({            range: "min",            value: 1,            min: 1,            max: 10,             slide: function (event, ui) {                 $("#paraone").text(ui.value);            }        });         $("#slidertwo").slider({            range: "min",            value: 1,            min: 1,            max: 10,             slide: function (event, ui) {                 $("#paratwo").text(ui.value);            }       });  }); 

try (demo):

$("#sliderone").slider({     range: "min",     value: 1,     min: 1,     max: 10,     slide: function(event, ui) {         $("#paraone").text(ui.value);         $('#paratotal').text(ui.value + $('#slidertwo').slider("value"));     }  });  $("#slidertwo").slider({     range: "min",     value: 1,     min: 1,     max: 10,     slide: function(event, ui) {         $("#paratwo").text(ui.value);         $('#paratotal').text(ui.value + $('#sliderone').slider("value"));     } }); 

Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -