Q:

Function: Check value doesn't work

I think the code expains what the problem is.  I want to check if the color is blue or not.  I think this is the problem "$(color)" but i don't know how to fix this. 
function test(color) {

                if ( $(color) == 'blue' ) {
                     // DO SOMETHING
                } else {
                     // DO SOMETHING
                }      

            }

            test("green");

UPDATE: I added some code because i tried to change the $(color) to color an this doesn't work.  Here is the full code:
function test(color) {

            if ( color == 'blue' ) {
                 $('#name').change( function() {
            } else {
                 $('#email').change( function() {
            }

            });

        }

        test("green");

A:

no use of $
there is no need to use $ before the javascript variable
 function test(color) {
        if (color== 'blue' ) {
             // DO SOMETHING
        } else {
             // DO SOMETHING
        }
 }
test("green");

A:

You don't need to use dollar for color variable. 
So your code will be:
function test(color) {
  var id;
  (color === 'blue') ? ( id = '#name') : (id = '#email'); 
  $(id).change( function() {
     /* your code */
  }); 
}

test("green");

