Toggle active class when default value of select is not chosen

$(document).ready(function(){

     // toggle active class for select dropdowns
     $('select').on('change', function() {
          if ($(this).val() != ""){
               $(this).addClass('select-active');
          } else {
               $(this).removeClass('select-active');
          }
     });
});