Can't select a class in an if statement

Can't select a class in an if statement

Hi, I'm trying to create a form validation that will alert the user if the dropdown lists contains empty values

but nothing happens with my code.

What's wrong with it?
  1. $('#compute').click(function()
  2.         {
  3.             if ($('.required').val=='')
  4.             {
  5.                 alert('Please complete the form before submitting again!');   
  6.             }
  7.        
  8. });
thanks