0
양식을 채우는 데 기반한 여러 가지 추가/제거 클래스가있는 결제 양식이 있습니다. 그러나 자동 완성 작업을 선택하면 내 jquery는 작동하지 않습니다. 마치 입력 내용이 텍스트가 입력되었음을 인식하지 못하는 것처럼 ... 내가 뭘 잘못하고있는 걸까요? 내 JS는 다음과 같습니다.양식 자동 완성 jquery 작업이 작동하지 않습니다.
jQuery(document).ready(function($) {
$('input[type="text"]').focus(function(){
$(this).closest('td').prev('td').addClass("bluebird");
}).blur(function() {
$(this).closest('td').prev('td').removeClass("bluebird");
})
$('input[type="text"]').keypress(function(){
$(this).closest('td').prev('td').addClass("bluebg");
}).blur(function() {
$(this).closest('td').prev('td').removeClass("bluebg");
checkFieldContentLength(this);
});
$(this).on('keyup change click autocomplete', function() {
checkFieldContentLength(this);
});
if ($(this).val().length > 0) {
$(this).closest('td').prev('td').addClass("has-text");
}
function monitorAutocomplete() {
$('input[type="text"]').change(function (type) {
checkFieldContentLength(this);
});