ContactForm7 지정 글자 수 채우면 다음

안녕하세요.

ContactForm7을 이용하여 제출 폼을 만들고 있습니다.

[tel* middle maxlength:4 class:inputs] 네개를 입력하면 그 다음 필드인 [tel* last maxlength:4 class:inputs] 이동하게끔 Jquery를 이용하여
코드를 짜고 있는데 무슨 이유에선지 작동을 안하네요.. 코드 첨부 합니다. 


shortcode는 이렇게 삽입 되어 있습니다.

[tel* middle maxlength:4 class:inputs][tel* last maxlength:4 class:inputs]

밑은 functions.php 삽입이며

add_action('wp_head', 'key');

function key(){
?>
<script>
jQuery(document).ready(function() {
  jQuery(".inputs").keyup(function() {
     if (jQuery(this).val().length == jQuery(this).attr("maxlength")) {
         jQuery(this).next(".inputs").focus();
        }
  });
});
</script>
<?php
};

 

워드프레스 에러 기술지원 서비스 전문가에게 맡기세요
워드프레스 에러 기술지원 서비스 전문가에게 맡기세요
워드프레스 에러 기술지원 서비스 전문가에게 맡기세요