How do I set width so that it never goes higher than 100% based on a variable value?
var progBarValue = $(this).find('.days-due').text();
$(this).find('.bar').width(progBarValue +"%");
I need the width value to clamp to a maximum of 100%.
For Example: If progBarValue returns 250% the width will still just be 100%.
I think you will have to modify the variable itself since the width attribute can be >100%.