0
텍스트 입력 필드에 특정 수의 문자가 입력되면 특정 동작 (버튼에서 클래스 제거)을 수행하려고합니다. 필드 내에 입력 작업이있을 때 작업을 수행하는 방법을 알고 있지만 특정 문자 수로 채워지는 경우는 아닙니다.텍스트 필드가 jquery로 특정 문자 수로 채워질 때의 동작
JQuery와 :
$("input[id='experience']").keyup(function() {
$("#fan_choice").find('a').removeClass('faded');
var $buttonlink = $('#fan_choice').find('a');
$buttonlink.attr('href', $buttonlink.attr('href').replace('#', '/artists'));
});
HTML/PHP :
이
내가 가진 무엇<span id="welcome_two" class="hidden">
<div id="fan_choice">
<a id="submit_two" href="#" class="button faded">Continue »</a>
<div class="styled_textarea">
{{ Form::textarea('experience', null, array(
'id' => 'experience',
'onfocus' => 'this.value=\'\'; setbg(\'$f0f7f8\');',
'onblur' => 'setbg(\'white\')',
'rows' => 10,
));}}
</div>
</div>
</span>
내가 클래스를 원하는 Laravel 4를 사용하여 "퇴색"하고 일하기 "a"버튼에서 제거하고 입력 상자에 입력 한 문자가 일정량있을 때 버튼의 "href"를 "/ artists"로 변경하고 싶습니다. 문자가 삭제 된 경우, 클래스를 퇴색하여 버튼에 다시 추가하고 "href"를 기본 "#"으로 다시 변경하고 싶습니다. 고맙습니다.