website/public/js/modules/awesome-form.js
2015-08-30 12:34:43 -04:00

23 lines
520 B
JavaScript
Executable File

(function() {
$(function() {
var awesomeInput, checkInput;
awesomeInput = '.awesome-form .input-group input';
checkInput = function(elem) {
var text_val;
text_val = $(elem).val();
if (text_val === '') {
$(elem).removeClass('has-value');
} else {
$(elem).addClass('has-value');
}
};
$(awesomeInput).focusout(function() {
checkInput(this);
});
$(awesomeInput).on('change', function() {
checkInput(this);
});
});
}).call(this);