Ciao a tutti,
in jQuery ho scritto due righe di codice, per far in modo che quando ho il focus su un campo input text, questo venga colorato internamente di grigio.
Codice PHP:
$(":text").bind("focus blur", function (event) {
if (event.type == "focus") {
$(this).css("border","1px solid #D8D8D8");
$(this).css("background-color", "#EDEDED");
} else {
$(this).css("border","1px solid #7F9DB9");
$(this).css("background","white");
}
});
La cosa funziona MA... ho notato che quando ho il focus nel campo input, questo diventa un po' più piccolo.
Cosa sto sbagliando??
PS: tutto funziona bene se ometto la parte che mette il bordo (però mi fa l'effetto "incassato").