How to select an input by value with jQuery 1.4.3 and higher

$('input[value="test"]') Should work fine…

EDIT

You could try using if statements, for example:

$("input").keyup(function(e) { 
    if (this.value == 'foo'){
        $(this).css('backgroundColor','red');
    }
    else if (this.value == 'bar'){
        $(this).css('backgroundColor','green');
    }
    else $(this).css('backgroundColor','white');
});

http://jsfiddle.net/ajthomascouk/HrXVS/

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)