How to add class depending on value of number?

How to add class depending on value of number?

Hello,

I have found a piece of code that has worked for me quite nicely. But I want to see how I can have the output of the code change the class of the outputted number depending on if the number is greater than or less than 100. 

The code I have is this:
  1. $(document).ready(function(){ 
  2. $('#div1,#div2,#div3,#div4').change(function(){
  3.         var total = 0;
  4.         $(#div1,#div2,#div3,#div4).each(function(){
  5.             if($(this).val() != '')
  6.             {
  7.                 total += parseInt($(this).val());
  8.             }
  9.         });
  10.         $('#total').html(total);
  11.     });
  12. })(jQuery);
So can someone help me figure out how to have the output have one class if its less than 100 and one class if its equal to 100? Also have the % sign output after the number. I would really appreciate the help. I am trying to lear but it is not coming fast. Thanks in advance.