$('input').on('change', function () {if ($(this).val()!='') $(this).attr('class','classSomethingIn');});