Run .progressbar() on every button click
thewebsitedev opened this issue · 1 comments
thewebsitedev commented
I am trying to run .progressbar()
on every button click but it does not work after one click. I mean .progressbar() grabs and stores the first values only and does not update the values on subsequent clicks.
How can I run it with new values every time the button is clicked?
I am using the below jQuery -
$('#progress-bars-preview').click(function(){
var percent = $('#progress_bar-percent').val();
if(percent=="percentage"){
percent = true;
}else{
percent = false;
}
$("#demo-progress-bar .bar").progressbar({
display_text: "fill",
done: function(current_percentage) {
$("#demo-progress-bar .bar span").show("slow");
},
use_percentage: percent
});
});
minddust commented
looks like you are note updating aria-valuetransitiongoal
.
take a look at the multitrigger example:
http://www.minddust.com/bootstrap-progressbar/bootstrap-3.0.0-rc2.html#m-multi-trigger-0