javascript - Input box getting thicker after a CSS background-color modification -


i have form validated through javascript script. 1 of function of script highlight input fields have been modified original values contained.

it works, when 1 of input field highlighted, become thicker when normally.

the js script add class input box:

function evidenzia_cambiamenti(id,testo) {     if (typeof(testo) === 'undefined') testo = '';     if ((document.getelementbyid(id).value != testo)) {         $('#'+id).addclass('campo_modificato');         $('#'+id).removeclass("errore_campo");         $('#'+id).removeclass("campo_obbligatorio");     } else if (document.getelementbyid(id).value == testo) {         $('#'+id).removeclass('campo_modificato');     } } 

while css class modifies background color:

.campo_modificato {     background-color: #ffffcc; } 

though none of actions remove default property of input box, can't understand difference between 2 views:

thank in advance.

apply css: given class applied input

input.campo_modificato:focus {     border-style: solid; } 

Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -