(function ($) { "use strict"; /*================================================================== [ Validate after type ]*/ $('.validate-input .input100').each(function(){ $(this).on('blur', function(){ if(validate(this) == false){ showValidate(this); } else { $(this).parent().addClass('true-validate'); } }) }) /*================================================================== [ Validate ]*/ var input = $('.validate-input .input100'); $('.validate-form').on('submit',function(){ var check = true; for(var i=0; i') $('.btn-hide-validate').each(function(){ $(this).on('click',function(){ hideValidate(this); }); }); } function hideValidate(input) { var thisAlert = $(input).parent(); $(thisAlert).removeClass('alert-validate'); $(thisAlert).find('.btn-hide-validate').remove(); } })(jQuery);